*/
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);