leaflet-gpx icon indicating copy to clipboard operation
leaflet-gpx copied to clipboard

Offset in rendering track

Open gareins opened this issue 10 months ago • 3 comments

Link: https://www.ozbo.lt/bike/2016/08/22/jugotrip/

I created this map many years ago and at some point the gpx track got shifted and I just assumed its time to update the site. I finally got around to it and even after fixing for all the new stuff, the map is still shifted to up-left for few pixels (if you zoom in you can see that gpx track layer changes position relative to base map). I also read the #152 and changed the base layer to no avail. Interestingly, the markers if I show them, are positioned more or less correctly (hard to judge, but defenitely better then the track itself). Attaching image with added markers.

Image

Link to source: https://www.ozbo.lt/jugotrip16/loadmap.js

gareins avatar Feb 21 '25 13:02 gareins

I see you have an offset: 30 in your polyline_options. Is that you attempting to fix the issue?

mpetazzoni avatar Mar 02 '25 11:03 mpetazzoni

Yeah, seems like an attempt that I forgot to remove when committing. Does not fix this issue though and will leave it in for now...

gareins avatar Mar 03 '25 08:03 gareins

Out of curiosity, do you notice the offset for GPX data in other parts of the world?

mpetazzoni avatar Mar 03 '25 17:03 mpetazzoni