Pan slowly on click on the nuisance map
This commit is contained in:
parent
82adb92d06
commit
8bed4fa2fa
2 changed files with 9 additions and 6 deletions
|
|
@ -125,12 +125,12 @@ class MapLocator extends HTMLElement {
|
|||
this._map.jumpTo(args);
|
||||
}
|
||||
|
||||
PanTo(coords, options) {
|
||||
this._map.panTo(coords, options);
|
||||
}
|
||||
|
||||
SetMarker(coords) {
|
||||
console.log("Setting map marker", coords);
|
||||
this._map.jumpTo({
|
||||
center: coords,
|
||||
zoom: 14,
|
||||
});
|
||||
this._markers.forEach((marker) => marker.remove());
|
||||
|
||||
const marker = new mapboxgl.Marker({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue