//= require jquery.timers
//= require jquery.cookie
//= require jquery.throttle-debounce
//= require jquery.timers
//= require jquery.cookie
//= require jquery.throttle-debounce
*/
function updatelinks(loc, zoom, layers, bounds, object) {
$(".geolink").each(function(index, link) {
*/
function updatelinks(loc, zoom, layers, bounds, object) {
$(".geolink").each(function(index, link) {
args = querystring.parse(link.search.substring(1));
if (bounds && $(link).hasClass("bbox")) args.bbox = normalBounds(bounds).toBBoxString();
args = querystring.parse(link.search.substring(1));
if (bounds && $(link).hasClass("bbox")) args.bbox = normalBounds(bounds).toBBoxString();
- href += OSM.formatHash({lat: loc.lat, lon: loc.lon || loc.lng, zoom: zoom});
+ args = {
+ lat: loc.lat,
+ lon: loc.lon || loc.lng,
+ zoom: zoom
+ };
+
+ if (layers && $(link).hasClass("layers")) {
+ args.layers = layers;
+ }
+
+ href += OSM.formatHash(args);
return [center.lng, center.lat, map.getZoom(), map.getLayersCode()].join('|');
}
return [center.lng, center.lat, map.getZoom(), map.getLayersCode()].join('|');
}
/*
* Forms which have been cached by rails may have the wrong
* authenticity token, so patch up any forms with the correct
/*
* Forms which have been cached by rails may have the wrong
* authenticity token, so patch up any forms with the correct