[OpenLayers-Users] clickTolerance on selectFeature?

Alexandre Dube adube at mapgears.com
Tue Aug 3 08:12:00 EDT 2010


Hi Alex,

   'clickTolerance' is a OpenLayers.Handler.Feature property.  If you 
look in the Select.js file, you'll see that the handler is set inside 
the initialize method and that there is no way other than modifying the 
code there to set your own 'clickTolerance'.  A thing you could do is to 
overwrite its default value to what you want but it will affect every 
other Controls that use it (do it before defining your SelectFeature 
control ) :

   OpenLayers.Handler.Feature.prototype.clickTolerance = 100;

   Try it and tell me if that worked for you.

Kind regards,

Alexandre


On 10-08-02 04:40 PM, Alex Brandsen wrote:
> Hi all,
>
> is it possible to set the clickTolerance on a selectFeature control? I 
> can find the clickTolerance on the getFeature control :
>
> (http://dev.openlayers.org/docs/files/OpenLayers/Control/GetFeature-js.html#OpenLayers.Control.GetFeature.clickTolerance)
>
> but not in the documentation of selectFeature. If I just try to add 
> "clickTolerance: 100" to the options array of selectFeature it has no 
> effect...
>
> Thanks,
>
> Alex.
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>    


-- 
Alexandre Dubé
Mapgears
www.mapgears.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100803/c923d9bf/attachment.html


More information about the Users mailing list