[OpenLayers-Users] Problem using containsPoint or intersects
Christopher Schmidt
crschmidt at metacarta.com
Mon Jan 26 13:11:21 EST 2009
On Mon, Jan 26, 2009 at 11:37:27AM -0600, Brian Walawender wrote:
> var warnPoly = new OpenLayers.Feature.Vector(new
> OpenLayers.Geometry.Polygon([linearRing]));
>
> var checkPoint = new OpenLayers.Geometry.Point(x, y);
> isIn = warnPoly.containsPoint(checkPoint);
>
> Unfortunately I get an error stating that containsPoint is not a function.
> I've also tried intersects with no success either.
Intersects (and containsPoint) are geometry methods, not feature
methods. Try warnPoly.geometry.intersects(checkPoint).
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list