Open SFSailor opened 2 years ago
Hack solution.
With a marker that is 12x30, with centers set at 6,15, the existing code would give me a value for "a" of 0,0.
My core hack below indicates I needed -6,-15
So now I just gotta figure out what formula gets me there the neatest way
_updateImg: function (i, a, s) { //a is the anchor. s is the size
a = L.point(s).divideBy(2)._subtract(L.point(a));
a=L.point([-6,-15]); //this is my hack
Okay. Here it is.
_updateImg: function (i, a, s) {
//a = L.point(s).divideBy(2)._subtract(L.point(a));
a=a.subtract(s);
Well, the title says it all. I have tried a full range of nearly random choices for iconanchor. I can get it to center nicely on the track without orientIcons:true, but once I start with the rotated icons they are displaced from the track by a consistent number of pixels.
Is this a bug? A setting?