[OpenLayers-Users] How can I catch an OL event inside a custom tool

Eric Lemoine eric.lemoine at camptocamp.com
Fri Mar 18 09:31:52 EDT 2011


On Friday, March 18, 2011, David Alda Fernandez de Lezea <dalda at ikt.es> wrote:
> Hi list,
>
> I've developed a custom tool that makes some geometric operations using a selected feature, and I want this tool to be active only when there is 1 feature selected in the layer. If the selection is empty the tool must deactitvated. How can I catch that event (featureselected) from my tool?? Any ideas?

Your tool must have a reference to the vector layer and register to
the "featureselected" events.

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list