Apply zoomPrecision to location cookie
This commit is contained in:
parent
1f22b625a0
commit
8c9992f695
1 changed files with 4 additions and 2 deletions
|
@ -170,7 +170,9 @@ OSM = {
|
|||
},
|
||||
|
||||
locationCookie: function(map) {
|
||||
var center = map.getCenter().wrap();
|
||||
return [center.lng, center.lat, map.getZoom(), map.getLayersCode()].join('|');
|
||||
var center = map.getCenter().wrap(),
|
||||
zoom = map.getZoom(),
|
||||
precision = OSM.zoomPrecision(zoom);
|
||||
return [center.lng.toFixed(precision), center.lat.toFixed(precision), zoom, map.getLayersCode()].join('|');
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue