com.google.gwt.maps.client.geometrylib
Class PolyUtils

java.lang.Object
  extended by com.google.gwt.maps.client.geometrylib.PolyUtils

public class PolyUtils
extends Object

Utility functions for computations involving polygons and polylines.

See Poly Utils API Doc


Constructor Summary
PolyUtils()
           
 
Method Summary
static boolean containsLocation(LatLng point, Polygon polygon)
          Computes whether the given point lies inside the specified polygon.
static boolean isLocationOnEdge(LatLng point, Polygon polygon)
          Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance.
static boolean isLocationOnEdge(LatLng point, Polygon polygon, double tolerance)
          Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance.
static boolean isLocationOnEdge(LatLng point, Polyline polyline)
          Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance.
static boolean isLocationOnEdge(LatLng point, Polyline polyline, double tolerance)
          Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolyUtils

public PolyUtils()
Method Detail

containsLocation

public static final boolean containsLocation(LatLng point,
                                             Polygon polygon)
Computes whether the given point lies inside the specified polygon.

Parameters:
point -
polygon -
Returns:
whether the polygon contains the point

isLocationOnEdge

public static final boolean isLocationOnEdge(LatLng point,
                                             Polygon polygon)
Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance.

Parameters:
point - test point
polygon - within this polygon
Returns:
whether location is on edge

isLocationOnEdge

public static final boolean isLocationOnEdge(LatLng point,
                                             Polyline polyline)
Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance.

Parameters:
point - test point
polyline - along this polyline
Returns:
whether location is on edge

isLocationOnEdge

public static final boolean isLocationOnEdge(LatLng point,
                                             Polygon polygon,
                                             double tolerance)
Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance.

Parameters:
point - test point
polygon - within tolerance of this polygon
tolerance - degrees from edge
Returns:
whether point is on edge

isLocationOnEdge

public static final boolean isLocationOnEdge(LatLng point,
                                             Polyline polyline,
                                             double tolerance)
Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance.

Parameters:
point - test point
polyline - within tolerance of this line
tolerance - degrees from edge
Returns:
whether point is on edge


Copyright © 2011-2013 GWT Maps API V3. All Rights Reserved.