<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
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.<br>
<br>
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 :<br>
<br>
OpenLayers.Handler.Feature.prototype.clickTolerance = 10;<br>
<br>
Regards,<br>
<br>
Alexandre<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/openlayers/browser/branches/openlayers/2.10/lib/OpenLayers/Handler/Feature.js#L59">http://trac.osgeo.org/openlayers/browser/branches/openlayers/2.10/lib/OpenLayers/Handler/Feature.js#L59</a><br>
[2]
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/openlayers/browser/branches/openlayers/2.10/lib/OpenLayers/Control/SelectFeature.js#L197">http://trac.osgeo.org/openlayers/browser/branches/openlayers/2.10/lib/OpenLayers/Control/SelectFeature.js#L197</a><br>
<br>
<br>
On 11-02-16 10:01 AM, jkm wrote:
<blockquote
cite="mid:AANLkTik=2PD-+n+7G482FJdD2OsNudt72m1wDOyq06wT@mail.gmail.com"
type="cite">
<div>Hi,</div>
<div><br>
</div>
<div>I would like to know if I'm in the right way..</div>
<div>I want to modify some features in a layer. And I do ..</div>
<div><br>
</div>
<div>dragcontrol = new OpenLayers.Control.ModifyFeature(lyr);</div>
<div>map.addControl(dragcontrol);</div>
<div>dragcontrol.activate();</div>
<div><br>
</div>
<div>I've seen that the SelectFeature has a clickTolerance
property, is there any property similar to that in the modify? </div>
<div>
Or i'm doing something bad ?</div>
<div><br>
</div>
<div>Thanks!</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>