- wiseLeafletPip :
function
Hayeswise Point-in-polygon for Leaflet: A plugin for Leaflet that provides points-in-polygons functions based on Dan Sunday's C++ winding number implementation.
- L
Leaflet
Hayeswise Point-in-polygon for Leaflet: A plugin for Leaflet that provides points-in-polygons functions based on Dan Sunday's C++ winding number implementation.
See
- Leaflet.PointInPolygon
- Inclusion of a Point in a Polygon by Dan Sunday.
Param | Type | Description |
---|---|---|
Leaflet | function |
namespace object. |
Leaflet
Kind: global external
See: Leaflet
Latitutde and longitude class.
Kind: static property of L
See: Leaflet documentation for further information.
Tests if a point is left|on|right of an infinite line.
This is a JavaScript and Leaflet port of the isLeft()
C++ function by Dan Sunday.
Kind: static property of LatLng
Returns: Number
- >0 for p2 left of the line through this point and p1,
=0 for p2 on the line,
<0 for p2 right of the line through this point an p1.
See: Inclusion of a Point in a Polygon by Dan Sunday.
Param | Type | Description |
---|---|---|
p1 | LatLng |
Point The reference line is defined by this LatLng to p1. |
p2 | LatLng |
The point in question. |
The Leaflet Polyline class.
Kind: static property of L
See: Leaflet documentation for further information.
- .Polyline
- .contains ⇒
boolean
- .getWindingNumber ⇒
Number
- .contains ⇒
Checks if a single point is contained in a polyline or polygon (L.Polygon extends L.Polyline).
Note that L.Polygon, L.GeodesicPolygons, and L.GeodesicCircles are types of L.Polygon.
Kind: static property of Polyline
Returns: boolean
- True if the point is contained in the polygon or polyline; otherwise,
See: Leaflet.Geodesc for information about Leaflet.Geodesc by Fragger.
Param | Type | Description |
---|---|---|
p | L.LatLng |
A geographical point with a latitude and longitude. |
Test for a point in a polygon or on the bounding lines of the polygon. The
coordinates (L.LatLngs) for a GeodesicPolygon are set to follow the earth's
curvature when the GeodesicPolygon object is created. Since L.Polygon
extends L.Polyline we can use the same method for both. Although, for
L.Polyline, we only get points on the line even if a collection of lines
appear to make a polygon.
This is a JavaScript and Leaflet port of the wn_PnPoly()
C++ function by Dan Sunday.
Unlike the C++ version, this implementation does include points on the line and vertices.
Kind: static property of Polyline
Returns: Number
- The winding number (=0 only when the point is outside)
See
- Inclusion of a Point in a Polygon by Dan Sunday.
- Leaflet.Geodesc for information about Leaflet.Geodesc by Fragger.
Param | Type | Description |
---|---|---|
p | L.LatLng |
A point. |
The Leaflet Polygon class. L.GeodesicPolygon and L.GeodesicCircle extend L.Polygon.
Kind: static property of L
See: Leaflet documentation for further information.