summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@dfupdate.se>2022-09-22 22:47:03 +0200
committerMarcus Lundblad <ml@dfupdate.se>2022-09-24 22:24:35 +0200
commitea4cc1081a779aa445c2caf2e658a00d3df19828 (patch)
treeda9d5dff6d3e5e36ec7390d1dbeadcfb031a2463
parent4024ea74cc7f8d8f923438f2827b11899c5f8a0f (diff)
downloadgnome-maps-ea4cc1081a779aa445c2caf2e658a00d3df19828.tar.gz
turnPointMarker: Fix going to the turnpointwip/mlundblad/fix-selecting-turnpoint
This method was still using the old libchamplain APIs, adapt it to use the libshumate API.
-rw-r--r--src/turnPointMarker.js14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/turnPointMarker.js b/src/turnPointMarker.js
index faacabe7..6ac57791 100644
--- a/src/turnPointMarker.js
+++ b/src/turnPointMarker.js
@@ -89,19 +89,7 @@ export class TurnPointMarker extends MapMarker {
}
goTo() {
- let view = this._mapView.view;
- let turnPointZoomLevel = 15;
- let latitude = this.latitude;
- let longitude = this.longitude;
-
- view.goto_duration = 0;
-
- Utils.once(view, 'animation-completed', () => {
- view.zoom_level = turnPointZoomLevel;
- view.center_on(latitude, longitude);
- });
-
- view.go_to(this.latitude, this.longitude);
+ this._mapView.map.go_to(this.latitude, this.longitude);
}
}