essais non fructueux de pré-charger les tiles au zoom sur les étapes
This commit is contained in:
@@ -2,7 +2,9 @@ import { initVueContentModale } from './utils/vue-setup';
|
||||
import { processClickableElements } from './utils/process-clickable-elements';
|
||||
import { handleReactiveness, setMenuToggle, setHamburgerWhenLogged } from './utils/layout-setup';
|
||||
import { initFirstLoadRouting, handleClickableElements, handleBrowserNavigation } from './utils/handle-navigation';
|
||||
import { setupMapStore } from './utils/map-setup';
|
||||
import { setupMapStore, preloadEtapesTiles } from './utils/map-setup';
|
||||
|
||||
import initEdgeBuffer from './libs/leaflet.edgebuffer';
|
||||
|
||||
import '../scss/main.scss'
|
||||
|
||||
@@ -11,8 +13,8 @@ import '../scss/main.scss'
|
||||
(function ($, Drupal, drupalSettings) {
|
||||
const CaravaneTheme = function () {
|
||||
function init () {
|
||||
console.log('DrupalSettings', drupalSettings);
|
||||
|
||||
// console.log('DrupalSettings', drupalSettings);
|
||||
|
||||
const baseUrl = window.location.protocol + "//" + window.location.host;
|
||||
const siteName = document.querySelector('#site_name').innerText;
|
||||
const { store, mapStore, router, route } = initVueContentModale();
|
||||
@@ -25,7 +27,12 @@ import '../scss/main.scss'
|
||||
|
||||
Drupal.behaviors.customLeafletInteraction = {
|
||||
attach: function(context, settings) {
|
||||
$(context).on('leafletMapInit', function (e, settings, map, mapid, markers) {
|
||||
|
||||
initEdgeBuffer(L);
|
||||
let mapSettings = settings.leaflet[Object.keys(settings.leaflet)[0]].map;
|
||||
mapSettings.layers.layer.edgeBufferTiles = 8;
|
||||
|
||||
$(context).on('leafletMapInit', function (e, settings, map, mapid, markers) {
|
||||
const {
|
||||
etapeListLinks,
|
||||
generalListLinks,
|
||||
@@ -36,6 +43,8 @@ import '../scss/main.scss'
|
||||
|
||||
setupMapStore(mapStore, map, settings);
|
||||
|
||||
// preloadEtapesTiles(mapStore, map);
|
||||
|
||||
initFirstLoadRouting(store, router, baseUrl, siteName);
|
||||
|
||||
handleClickableElements(clickableElements, store, router, baseUrl, siteName, mapStore);
|
||||
|
Reference in New Issue
Block a user