shramov / leaflet-plugins

Plugins for Leaflet library

Home Page:http://psha.org.ru/b/leaflet-plugins.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to rotate in place?

distante opened this issue · comments

I want to use Market.Rotate.js to rotate a marker that is basically a circle with an arrow inside and the marker position is in the middle of this circle.

Right now this does not work because it assumes the marker is a pin and I can not find the correct way to make it rotate in place.

How can I accomplish that?

commented

Hmm have you set your icon anchor ? Can you provide a fiddle or a demo page ?

I make a quick fiddle Here, as you can see, when I set the angle to 100 it moves from the map point

commented

As i said, set your icon anchor with the right value and u're done :)

https://jsfiddle.net/r4y9awp4/3/

Ah, sorry, you where rigth. I left here my updated fiddle because you forgot to put the icon anchor on yours :)
Updated Fiddle