[GIS] HTML Dom elements as marker / feature in Openlayers

markersopenlayers-2

I want to set HTML Dom element as marker in openlayers, instead of GIFs,PNGs. Is it possible to do so?

Best Answer

What kind of DOM element would you like to use as a marker?

If you just want to create a simple vector graphic for your marker I recommend to create a symbol like so:

OpenLayers.Renderer.symbol.BN = [0,9, 3,4.5, 8.5,4.5, 4.5,0, 8.5,-4.5, 3,-4.5, 0,-9, -3,-4.5, -8.5,-4.5, -4.5,0, -8.5,4.5, -3,4.5, 0,9];