[OpenLayers-Users] Polygon Select Tool

Ignacio Talavera ignacio.talavera at gmail.com
Fri Aug 12 00:07:51 EDT 2011


Hi, the control OpenLayers.Control.GetFeature has a boolean *box* property
and is showed in the examples
of OL.
http://dev.openlayers.org/releases/OpenLayers-2.10/examples/getfeature-wfs.html
Hope it will be useful
Regards
Nacho


On Thu, Aug 11, 2011 at 6:54 PM, Adam Eskreis <aeskreis at gmail.com> wrote:

> 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
>>
>
>
> _______________________________________________
> 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/20110812/08d4ac08/attachment.html


More information about the Users mailing list