You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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
the code uses "_subtract" but the documented function is "subtract"
I revised the code around line 184 of the .js as follows. This gives me the negative values that appear to work in my application. Should this go into core?
_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?
The text was updated successfully, but these errors were encountered: