Prevent unnecessary tile loading for default base layer

by only setting it if no layer activated by hash URL
This commit is contained in:
Norbert Renner 2019-04-03 11:54:52 +02:00
parent d60b1ad15f
commit 282edbbc01
5 changed files with 40 additions and 6 deletions

View file

@ -314,6 +314,12 @@
layersControl: layersControl
});
// activate configured default base layer or first if no hash,
// only after hash init, by using the same delay
setTimeout(function () {
layersControl.activateDefaultBaseLayer();
}, urlHash.changeDefer);
routingOptions.on('update', urlHash.onMapMove, urlHash);
nogos.on('update', urlHash.onMapMove, urlHash);
// waypoint add, move, delete (but last)