[OpenLayers-Users] Update Markers

Paul A. Smith paulsmith at pobox.com
Fri Nov 2 18:28:05 EDT 2007



Christopher Schmidt-4 wrote:
> 
> There is no 'supported' way of doing this, but marker.icon.imageDiv is
> the actual container for the image. (This probably is a div, with an img
> as its firstChild.) Using this and just changing
> marker.icon.imageDiv.firstChild.src will probably work, but it is
> possible (though at this point, seems relatively unlikely) that the name 
> 'imageDiv' will change in the future, so you should be prepared to check
> your code against a new release before switching over.
> 

I'm using this technique to swap out/in marker icons based on certain
events. It works, but when the map is zoomed in or out, the marker icons
revert to their initial state. Any way I can make them "stick"?

Cheers,
-Paul
-- 
View this message in context: http://www.nabble.com/Update-Markers-tf4351341.html#a13557437
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list