return url;
},
- mapParams: function (search) {
- var params = {}, mapParams = {}, bounds, loc;
+ params: function(search) {
+ var params = {};
search = (search || window.location.search).replace('?', '').split(/&|;/);
params[key] = decodeURIComponent(val);
}
+ return params;
+ },
+
+ mapParams: function (search) {
+ var params = OSM.params(search), mapParams = {}, bounds, loc;
+
if (params.mlon && params.mlat) {
mapParams.marker = true;
mapParams.mlon = parseFloat(params.mlon);
mapParams.zoom = hash.zoom;
mapParams.object_zoom = false;
} else if (bounds) {
+ mapParams.lon = bounds.getCenter().lng; // Not used by main map, but
+ mapParams.lat = bounds.getCenter().lat; // are used by iD/Potlatch.
mapParams.bounds = bounds;
mapParams.object_zoom = false;
} else if (params.lon && params.lat) {