[OpenLayers-Users] containsPoint() Help por favor

Jesse Bushkar apt94jesse at gmail.com
Fri Oct 9 20:19:00 EDT 2009


I need some help with containsPoint().  I have a variable (myLoc) that
represents a given point on the map on one layer.  Tthe features I'm trying
to monitor are polygons, so I think I could just use the containsPoint
function mixed with a for loop for each feature.  Does that make sense?
Also, would it matter that my starting point and the other polygons are on
different layers?

Something like:


var isHere;
for (var i = 0; i < layer.features; i++) {
   isHere = layer.feature[i].containsPoint(myLoc);
   if (isHere = TRUE) {
          alert('true');
   }
}

am I way off?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091009/bb5160a5/attachment.html


More information about the Users mailing list