[OpenLayers-Users] Register multiple map layers for same
event... how???
Eric Lemoine
eric.lemoine at camptocamp.com
Thu Oct 29 03:54:59 EDT 2009
On Wednesday, October 28, 2009, plen <peteralen at earthlink.net> wrote:
>
> Eric,
>
> Thanks for the response. You have answered some of my questions in the past
> and I appreciate it. As for this question, I did find the SelectFeature
> control you mentioned and was able to successfully add more than one
> OpenLayers.Layer.Vector layer to the control and was able to register a
> "featureselected" event via:
>
> getFeaturesLayer1().events.register("featureselected", getFeaturesLayer1(),
> fclick);
>
> All works fine. I orginally thought, however, that my real problem would be
> solved in finding this solution, but it is not. What I really need is to be
> able to share events amoung two different types of layers. For example, I
> need to have an OpenLayers.Layer.Vector and an OpenLayers.Layer.Markers
> share the same event (rather than two OpenLayers.Layer.Vector share the same
> event). Looking at the API for the SelectFeature control, it seems to
> indicate that only OpenLayers.Layer.Vector layers can be used. Is this true
> or is there a way to have two different types of layers share the same
> event?
the select feature control works with vector layers only. Anyway, it
is now recommended to use Layer.Vector for markers as well, through
the externalGraphic style property.
Sorry if I misunderstood your question.
--
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