turnPointMarker: Fix going to the turnpoint
This method was still using the old libchamplain
APIs, adapt it to use the libshumate API.
Marcus Lundblad
1 year, 7 months ago
88 | 88 | } |
89 | 89 | |
90 | 90 | goTo() { |
91 | let view = this._mapView.view; | |
92 | let turnPointZoomLevel = 15; | |
93 | let latitude = this.latitude; | |
94 | let longitude = this.longitude; | |
95 | ||
96 | view.goto_duration = 0; | |
97 | ||
98 | Utils.once(view, 'animation-completed', () => { | |
99 | view.zoom_level = turnPointZoomLevel; | |
100 | view.center_on(latitude, longitude); | |
101 | }); | |
102 | ||
103 | view.go_to(this.latitude, this.longitude); | |
91 | this._mapView.map.go_to(this.latitude, this.longitude); | |
104 | 92 | } |
105 | 93 | } |
106 | 94 |