Use baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up Map Data layer render

This commit is contained in:
Roman Deev 2025-01-07 03:17:24 +03:00
parent d76b7a5eea
commit dae7a003fe
7 changed files with 38 additions and 25 deletions

View file

@ -190,7 +190,7 @@ OSM.Router = function (map, rts) {
currentRoute = routes.recognize(currentPath);
};
map.on("moveend baselayerchange overlaylayerchange", router.updateHash);
map.on("moveend baselayerchange overlayadd overlayremove", router.updateHash);
$(window).on("hashchange", router.hashUpdated);
return router;