Marker tooltip with negative elevation
mttucl opened this issue · 1 comments
When displaying bathymetry data, the marker tooltip line is shown above the path with the tip outside the map. This only happens if all data is negative. If there is another path with positive elevation data, it will only happen if I display the bathymetry data first for the first time after loading the page. Once I check the other path, it will display the bathymetry data tooltip correctly.
Sorry, I don't have a working example but you can try the geojson demo example with attachment (change txt to geojson).
Hi @mttucl,
If you're interested in seeing it resolved, please check it out and pitch a PR.
I would say that the problem is related to yMax calculation (I haven't checked in detail):
leaflet-elevation/src/components/marker.js
Lines 63 to 64 in bd9316b
leaflet-elevation/src/components/d3.js
Lines 129 to 134 in bd9316b
which also depends on yCoordMax variable:
leaflet-elevation/src/control.js
Line 189 in bd9316b
leaflet-elevation/src/control.js
Line 365 in bd9316b
leaflet-elevation/src/control.js
Lines 1257 to 1269 in bd9316b
If you're interested in seeing it resolved, please take a hard look and pitch a PR.
👋 Raruto
