A
A
Alexander2014-09-23 17:55:58
leaflet
Alexander, 2014-09-23 17:55:58

How to add SVG image on top of standard marker in leaflet?

I want to make a marker factory where I can create a standard leaflet marker but with an svg image on top.
Maybe similar plugins exist? If not, please advise how best to implement this?
PS I found this tutorial: leafletjs.com/examples/custom-icons.html
If I substitute the svg image, it works. But I would like some kind of substrate, a common background for all markers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
My joy, 2014-09-25
@tru3

It seems to me that the standard divIcon instead of Icon is best suited for this, there you already embed what you want in the html option, + the class option for the general frame (bind the css class in which there will be an image of a standard marker).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question