[OpenLayers-Users] Point in polygon

Eric Lemoine eric.lemoine at camptocamp.com
Wed Nov 4 01:57:28 EST 2009


On Wednesday, November 4, 2009, Brad Spencer <brad at cubewerx.com.au> wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
> Guys, I have created a vector polygon as follows:
>
>
>
> var parcel01 = new
> OpenLayers.Geometry.LinearRing(pointList);
>
> polygonFeature = new OpenLayers.Feature.Vector( new
> OpenLayers.Geometry.Polygon([parcel01]));
>
> vectorLayer.addFeatures([polygonFeature]);
>
>
>
> I then am parsing a list of external points to include only
> those that are inside the polygon on the map as vector markers.
>
>
>
> I have tried the following with no success:
>
>
>
> If (polygonFeature.intersects(new
> OpenLayers.Geometry.Point(p[0], p[1]))) {// include code…}

and polygonFeature.geometry.intersects()?

Cheers,


-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list