On Wednesday, October 28, 2009, plen <[email protected]> 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 : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
