Hi all,<br><br>I still haven't found a way to make this work, does anyone have any suggestions? <br><br>To rephrase: I need some way to select a feature when a click occurs on, or in the area around the feature, for example 20 pixels.<br>
<br>Thanks,<br><br>Alex.<br><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 5:44 PM, Alex Brandsen <span dir="ltr"><<a href="mailto:alex.brandsen@gmail.com">alex.brandsen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Yeah, apparently.. Do you (or anyone else) know how to create a similar effect with selectFeature then?<br><br>Alex.<br><br>Date: Wed, 04 Aug 2010 11:02:01 -0400<div class="im"><br>
From: Alexandre Dube <<a href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>><br>
Subject: Re: [OpenLayers-Users] clickTolerance on selectFeature?<br>
To: <a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a><br></div>
Message-ID: <<a href="mailto:4C5980E9.4000701@mapgears.com" target="_blank">4C5980E9.4000701@mapgears.com</a><div><div class="im">><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br></div>
Alex,<br>
<br>
My bad. the 'clickTolerance' of the GetFeature control has not the<br>
same purpose as the 'clickTolerance' of the Feature Handler :<br>
<br>
<a href="http://dev.openlayers.org/docs/files/OpenLayers/Handler/Feature-js.html#OpenLayers.Handler.Feature.clickTolerance" target="_blank">http://dev.openlayers.org/docs/files/OpenLayers/Handler/Feature-js.html#OpenLayers.Handler.Feature.clickTolerance</a><br>
<br>
Regards,<br>
<br>
Alexandre<div class="im"><br>
<br>
<br>
On 10-08-04 10:36 AM, Alex Brandsen wrote:<br>
> Hi Alexandre,<br>
><br>
> thanks for your reply! I tried using<br>
> OpenLayers.Handler.Feature.prototype.clickTolerance=100/1000/1000000;<br>
> , but it makes no difference. It does get stored, because when I do<br>
> alert(OpenLayers.Handler.Feature.prototype.clickTolerance); it does<br>
> show the correct value.<br>
><br>
> I also tried altering the clickTolerance in openlayers.js, but that<br>
> didn't do anything either.<br>
><br>
> Thanks,<br>
><br>
> Alex.<br>
><br>
> Date: Tue, 03 Aug 2010 08:12:00 -0400<br></div>
> From: Alexandre Dube <<a href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a> <mailto:<a href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>>><div class="im"><br>
> Subject: Re: [OpenLayers-Users] clickTolerance on selectFeature?<br></div>
> To: <a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a> <mailto:<a href="mailto:users@openlayers.org" target="_blank">users@openlayers.org</a>><div class="im"><br>
> Message-ID: <<a href="mailto:4C580790.3030102@mapgears.com" target="_blank">4C580790.3030102@mapgears.com</a><br></div>
> <mailto:<a href="mailto:4C580790.3030102@mapgears.com" target="_blank">4C580790.3030102@mapgears.com</a>><div class="im"><br>
> ><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>
> ><br>
> (<a 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></div>
> > <a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a> <mailto:<a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a>><div class="im"><br>
> > <a 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></div>
> <a href="http://www.mapgears.com/" target="_blank">www.mapgears.com</a> <<a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a>><div class="im"><br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
> <a 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 href="http://www.mapgears.com/" target="_blank">www.mapgears.com</a></div></div>
</blockquote></div><br>