Use baselayerchange/overlaylayerchange instead of layeradd/layerremove for speed up Map Data layer render
This commit is contained in:
parent
d76b7a5eea
commit
dae7a003fe
7 changed files with 38 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue