[OpenLayers-Users] Register multiple map layers for same event... how???

plen peteralen at earthlink.net
Thu Oct 29 09:33:35 EDT 2009







Eric, 
  
Sorry for replying back in this email but I have tried several times to reply on the forum with no luck.  Not sure why the reply would not post.  In any case this is what I stated: 
------------------------------ 
No, you did not misunderstand my question.  I just put it in two parts.  Thanks for your latest response.  It verifies one of our main issues.  
On a side note, we did make the switch from creating OpenLayers.Marker markers (OpenLayers.Layer.Markers layer) to creating OpenLayers.Feature.Vector features (OpenLayers.Layer.Vector layer) as you indicated, but what we have found out is that adding the OpenLayers.Feature.Vector features to the map is a MUCH more expensive (timewise) operation than adding OpenLayers.Marker markers to the map.  Because of this, we want to go back to creating OpenLayers.Marker markers because performance is so much better. 
----------------------------- 
Thanks again for your help Eric - Peter 
-----Original Message----- From: "Eric Lemoine-2-2 [via OSGeo.org]" Sent: Oct 29, 2009 3:55 AM To: plen Subject: Re: [OpenLayers-Users] Register multiple map layers for same event... how??? On Wednesday, October 28, 2009, plen < [hidden email] > 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 : [hidden email]  http://www.camptocamp.com _______________________________________________ Users mailing list [hidden email]  http://openlayers.org/mailman/listinfo/users 


View message @ http://n2.nabble.com/Register-multiple-map-layers-for-same-event-how-tp3872249p3910342.html  To unsubscribe from Re: Register multiple map layers for same event... how???, click here . 

-- 
View this message in context: http://n2.nabble.com/Register-multiple-map-layers-for-same-event-how-tp3872249p3912402.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091029/08757e1c/attachment.html


More information about the Users mailing list