Pan to correct location when switching projections

This commit is contained in:
James Lyne 2020-12-21 12:45:03 +00:00
parent 240e9d62fb
commit 069e4dc641

View File

@ -126,6 +126,14 @@ export default defineComponent({
this.updateFollow(newValue, false);
}
},
currentProjection(newValue, oldValue) {
if(this.leaflet && newValue && oldValue) {
this.leaflet.panTo(newValue.locationToLatLng(oldValue.latLngToLocation(this.leaflet.getCenter(), 64)), {
animate: false,
noMoveStart: true,
});
}
},
currentWorld(newValue, oldValue) {
const store = useStore();