maplibre-gl-js
maplibre-gl-js copied to clipboard
Remove finalize elevation when updating elevation on the fly
Don't _finalizeElevation if freezeElevation has not been set.
This means that elevation logic has two distinct operating modes.
Mode one - freezeElevation is false - default:
- updateElevation is called continuously during the movement
- finalizeElevation is not called at the end.
Mode two - freezeElevation is true:
- updateElevation is not called continuoulsy during the movement
- finalizeElevation is called at the end.
Previously, both methods were called in mode one, which lead to issue #3878 if freezeElevation was not set.
Fixes #3878
Launch Checklist
- [x] Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
- [x] Briefly describe the changes in this PR.
- [x] Link to related issues.
- [ ] Include before/after visuals or gifs if this PR includes visual changes.
- [x] Write tests for all new functionality.
- [ ] Document any changes to public APIs.
- [ ] Post benchmark scores.
- [x] Add an entry to
CHANGELOG.md
under the## main
section.