<!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">
Alex,<br>
<br>
My bad. the 'clickTolerance' of the GetFeature control has not the
same purpose as the 'clickTolerance' of the Feature Handler :<br>
<br>
<a class="moz-txt-link-freetext" href="http://dev.openlayers.org/docs/files/OpenLayers/Handler/Feature-js.html#OpenLayers.Handler.Feature.clickTolerance">http://dev.openlayers.org/docs/files/OpenLayers/Handler/Feature-js.html#OpenLayers.Handler.Feature.clickTolerance</a><br>
<br>
Regards,<br>
<br>
Alexandre<br>
<br>
<br>
On 10-08-04 10:36 AM, Alex Brandsen wrote:
<blockquote
cite="mid:AANLkTina7_Mv8Vb7xpH=ZVXm07oV8LGGjV4pKt-JSct8@mail.gmail.com"
type="cite">Hi Alexandre,<br>
<br>
thanks for your reply! I tried using
OpenLayers.Handler.Feature.prototype.clickTolerance=100/1000/1000000; ,
but it makes no difference. It does get stored, because when I do
alert(OpenLayers.Handler.Feature.prototype.clickTolerance); it does
show the correct value.<br>
<br>
I also tried altering the clickTolerance in openlayers.js, but that
didn't do anything either. <br>
<br>
Thanks,<br>
<br>
Alex.<br>
<br>
Date: Tue, 03 Aug 2010 08:12:00 -0400<br>
From: Alexandre Dube <<a moz-do-not-send="true"
href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>><br>
Subject: Re: [OpenLayers-Users] clickTolerance on selectFeature?<br>
To: <a moz-do-not-send="true" href="mailto:users@openlayers.org"
target="_blank">users@openlayers.org</a><br>
Message-ID: <<a moz-do-not-send="true"
href="mailto:4C580790.3030102@mapgears.com" target="_blank">4C580790.3030102@mapgears.com</a>
<div>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi Alex,<br>
<br>
'clickTolerance' is a OpenLayers.Handler.Feature property. If you<br>
look in the Select.js file, you'll see that the handler is set inside<br>
the initialize method and that there is no way other than modifying the<br>
code there to set your own 'clickTolerance'. A thing you could do is to<br>
overwrite its default value to what you want but it will affect every<br>
other Controls that use it (do it before defining your SelectFeature<br>
control ) :<br>
<br>
OpenLayers.Handler.Feature.prototype.clickTolerance = 100;<br>
<br>
Try it and tell me if that worked for you.<br>
<br>
Kind regards,<br>
<br>
Alexandre<br>
<br>
<br>
On 10-08-02 04:40 PM, Alex Brandsen wrote:<br>
> Hi all,<br>
><br>
> is it possible to set the clickTolerance on a selectFeature
control? I<br>
> can find the clickTolerance on the getFeature control :<br>
><br>
> (<a moz-do-not-send="true"
href="http://dev.openlayers.org/docs/files/OpenLayers/Control/GetFeature-js.html#OpenLayers.Control.GetFeature.clickTolerance"
target="_blank">http://dev.openlayers.org/docs/files/OpenLayers/Control/GetFeature-js.html#OpenLayers.Control.GetFeature.clickTolerance</a>)<br>
><br>
> but not in the documentation of selectFeature. If I just try to add<br>
> "clickTolerance: 100" to the options array of selectFeature it has
no<br>
> effect...<br>
><br>
> Thanks,<br>
><br>
> Alex.<br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a moz-do-not-send="true" href="mailto:Users@openlayers.org"
target="_blank">Users@openlayers.org</a><br>
> <a moz-do-not-send="true"
href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
><br>
<br>
<br>
--<br>
Alexandre Dub?<br>
Mapgears<br>
<a moz-do-not-send="true" href="http://www.mapgears.com/"
target="_blank">www.mapgears.com</a></div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/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>