I18n.t('javascripts.site.edit_disabled_tooltip') : '');
}
-// generate a cookie-safe string of map state
-function cookieContent(map) {
- var center = map.getCenter().wrap();
- return [center.lng, center.lat, map.getZoom(), map.getLayersCode()].join('|');
-}
-
function escapeHTML(string) {
var htmlEscapes = {
'&': '&',
map._object);
$.removeCookie("_osm_location");
- $.cookie("_osm_location", cookieContent(map), { expires: expiry, path: "/" });
+ $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" });
});
if ($.cookie('_osm_welcome') == 'hide') {
return hash;
},
- zoomPrecision: function (zoom) {
+ zoomPrecision: function(zoom) {
return Math.max(0, Math.ceil(Math.log(zoom) / Math.LN2));
+ },
+
+ locationCookie: function(map) {
+ var center = map.getCenter().wrap();
+ return [center.lng, center.lat, map.getZoom(), map.getLayersCode()].join('|');
}
};