essais non fructueux de pré-charger les tiles au zoom sur les étapes
This commit is contained in:
@@ -254,7 +254,7 @@ export const useContentStore = defineStore('content', {
|
||||
|
||||
this.content[`${this.contentType}s`] = multiItemPageArray;
|
||||
|
||||
console.log(this.content);
|
||||
// console.log(this.content);
|
||||
}
|
||||
} catch (error) {
|
||||
this.error = 'Failed to fetch data';
|
||||
|
@@ -17,18 +17,18 @@ export const useMapStore = defineStore('mapState', {
|
||||
}),
|
||||
actions: {
|
||||
zoomToPlace(lat, long) {
|
||||
if (useLayoutStore().isDesktop) long = long - 0.03;
|
||||
if (useLayoutStore().isDesktop) long = long - 0.03;
|
||||
this.map.flyTo(
|
||||
[lat, long],
|
||||
this.maxZoom,
|
||||
{ animate: this.animationsAreEnabled, animationDuration: this.animationDuration });
|
||||
{ animate: this.animationsAreEnabled, duration: this.animationDuration });
|
||||
this.currentZoom = this.maxZoom;
|
||||
},
|
||||
resetMap() {
|
||||
resetMap(animate = this.animationsAreEnabled, duration = this.animationDuration) {
|
||||
this.map.flyTo(
|
||||
this.defaultMapCenter,
|
||||
useLayoutStore().isDesktop ? this.defaultZoomDesktop : this.defaultZoomMobile,
|
||||
{ animate: this.animationsAreEnabled, animationDuration: this.animationDuration });
|
||||
{ animate, duration });
|
||||
this.currentZoom = useLayoutStore().isDesktop ? this.defaultZoomDesktop : this.defaultZoomMobile;
|
||||
},
|
||||
lockMap() {
|
||||
|
Reference in New Issue
Block a user