[OpenLayers-Users] clickTolerance on selectFeature?

Alex Brandsen alex.brandsen at gmail.com
Fri Aug 6 12:44:50 EDT 2010


Yeah, apparently.. Do you (or anyone else) know how to create a similar
effect with selectFeature then?

Alex.

Date: Wed, 04 Aug 2010 11:02:01 -0400
From: Alexandre Dube <adube at mapgears.com>
Subject: Re: [OpenLayers-Users] clickTolerance on selectFeature?
To: users at openlayers.org
Message-ID: <4C5980E9.4000701 at mapgears.com
>
Content-Type: text/plain; charset="iso-8859-1"

Alex,

  My bad.  the 'clickTolerance' of the GetFeature control has not the
same purpose as the 'clickTolerance' of the Feature Handler :

http://dev.openlayers.org/docs/files/OpenLayers/Handler/Feature-js.html#OpenLayers.Handler.Feature.clickTolerance

Regards,

Alexandre


On 10-08-04 10:36 AM, Alex Brandsen wrote:
> Hi Alexandre,
>
> 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.
>
> I also tried altering the clickTolerance in openlayers.js, but that
> didn't do anything either.
>
> Thanks,
>
> Alex.
>
> Date: Tue, 03 Aug 2010 08:12:00 -0400
> From: Alexandre Dube <adube at mapgears.com <mailto:adube at mapgears.com>>
> Subject: Re: [OpenLayers-Users] clickTolerance on selectFeature?
> To: users at openlayers.org <mailto:users at openlayers.org>
> Message-ID: <4C580790.3030102 at mapgears.com
> <mailto:4C580790.3030102 at mapgears.com>
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> 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 <mailto:Users at openlayers.org>
> > http://openlayers.org/mailman/listinfo/users
> >
>
>
> --
> Alexandre Dub?
> Mapgears
> www.mapgears.com <http://www.mapgears.com/>
>
>
> _______________________________________________
> 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/20100806/6e515e26/attachment.html


More information about the Users mailing list