Hi,
Problem
I am stuck on an issue relating to the elevation profile widget where when hovering the elevation chart, the indicator does not follow the corresponding lines on the map. See image.
It is clear it partially has the right data, as moving along the chart makes the indicator follow the correct shape of the track/line. The offset distance is not fixed, it varies when zooming in and out. The more I zoom in, the closer the indicator and line paths come to alignment.
Context
- Using SceneView with world-elevation as base map
- Tracks are represented by GeoJSONLayer
- Track's Polyline is made with the primary view's spatial reference
- The elevation chart data appears to be correct
const map = new Map({
basemap: "satellite",
ground: "world-elevation",
});
const _view = new SceneView({
container: mapDiv.current,
map: map,
...
});const trackLayer = new GeoJSONLayer({
url: TRACKS_URL,
...
});
view.map.add(trackLayer);const inputLine = new Graphic({
geometry: new Polyline({
paths: polylinePaths, // track coordinates
spatialReference: view.spatialReference
})
});
const elevationProfile = new ElevationProfile({
view,
container: elevationProfileRef.current,
input: inputLine,
...
});
Question
Why does the indicator not align with the tracks when hovering the elevation profile chart?
Kind regards.