[OpenLayers-Dev] arbitrary element as marker?

Paul Spencer pspencer at dmsolutions.ca
Tue Jun 17 09:21:35 EDT 2008

Is it possible to use an arbitrary HTML element (say a div containing  
several images) as a marker?  My use case is that I have several  
different styles of marker images and then some overlay images that  
add a numeral or letter on top of the marker.  OpenLayers.Marker uses  
OpenLayers.Icon, which will only show an single image.

I could put two markers in the same location but that seems horribly  

I could also probably use a Point feature and override the styling but  
it seems like a lot of effort to get a reasonably simple effect.

If it is not currently possible to do this then I will implement it -  
any suggestions?  Seems like the simplest method would be to subclass  
or modify the Icon class to allow for an arbitrary element.




    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc

More information about the Dev mailing list