Hi,

The OpenLayers.Handler.Feature has a clickTolerance property [1], not the SelectFeature control. Still, the SelectFeature control use a Feature handler and the ModifyFeature control use a SelectFeature control.

Since the you can't set any handler options when creating either a SelectFeature or a ModifyFeature control [2], you should override the clickTolerance value before creating them, as such :

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

Regards,

Alexandre

[1] http://trac.osgeo.org/openlayers/browser/branches/openlayers/2.10/lib/OpenLayers/Handler/Feature.js#L59 [2] http://trac.osgeo.org/openlayers/browser/branches/openlayers/2.10/lib/OpenLayers/Control/SelectFeature.js#L197


On 11-02-16 10:01 AM, jkm wrote:
Hi,

I would like to know if I'm in the right way..
I want to modify some features in a layer. And I do ..

dragcontrol = new OpenLayers.Control.ModifyFeature(lyr);
map.addControl(dragcontrol);
dragcontrol.activate();

I've seen that the SelectFeature has a clickTolerance property, is there any property similar to that in the modify?
Or i'm doing something  bad ?

Thanks!


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users


--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to