[OpenLayers-Users] Polygon Select Tool
Adam Eskreis
aeskreis at gmail.com
Thu Aug 11 17:54:21 EDT 2011
Not sure if OpenLayers has this built in, but it seems fairly strait-forward
to do this with just a few lines of javascript. Just attach a javascript
function to the "featureadded" event of your drawing vector layer to do
something like this:
for(var f in vectorLayer.features) {
if(polygon.geometry.intersects(f.geometry)) {
selectFeatureControl.select(f);
}
}
On Thu, Aug 11, 2011 at 3:42 PM, osullivj <jeremiahosullivan at gmail.com>wrote:
> Hi,
>
> I am aware the select control can use a BBOX...does anyone know if it is
> possible to allow the user to draw a polygon to select all points within
> the
> polygon
>
> Thanks,
> Jerry
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Polygon-Select-Tool-tp6677807p6677807.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110811/d9643140/attachment.html
More information about the Users
mailing list