essais non fructueux de pré-charger les tiles au zoom sur les étapes

This commit is contained in:
2025-01-22 02:25:22 +01:00
parent d8785d830c
commit c11b90f235
6 changed files with 98 additions and 10 deletions

View File

@@ -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';

View File

@@ -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() {