Does anybody knows why rotated marker icon is not where it should be on a map? It’s always moved for some distance from it should be on a map. Only when make max zoom in it’s where it should be?
Hi Matti,
is there a possibility to simply change the color of the marker? The setStyle()-Method doesn’t seem to do anything.
I just need to change the default color of the icon to e.g. red, green etc. The svg can stay unchanged.
Thanks!
The default marker is a raster image IIRC. It might be quite easy to make the color of SVG marker to be configured somehow. Do you have a static list of colors you’d use or would those need to be dynamic? If static, then the solution could use CSS.
Hi Matti,
static would be totally sufficient. It should be enough to have something like let’s say 10 or 20 predefined colors to play with. I tried with CSS, but no luck.
Can you provide an example pls?
Thanks
I’m finding that if I put setIconSize(…) the whole background of the icon will be a white box. If I leave it then I still get a whitebox but it’s much smaller. setIconAnchor only seems to adjust where the anchor is and has no bearing on the whitebox (whether you set it or not). As in has the fix changed over the last year?
Stephan, do you need that whitebox or not? I think most often you want to get rid of it using the v-leaflet-custom-svg stylename. If you need to block transparency, you can do that in the image/svg.
hello all,
I use v-leaflet to create my map in a web application i create many markers with different icon
I need to create a click listener on a marker and open a pop up window
Can you provide an example please?
Thanks