map.zoomToExtent(proj(bbox));
if (params.box) {
- $(window).load(function() { addBoxToMap(bbox) });
+ addBoxToMap(bbox);
}
} else {
setMapCenter(new OpenLayers.LonLat(params.lon, params.lat), params.zoom);
}
if (params.object) {
- var url = "/api/" + OSM.API_VERSION + "/" + params.object_type + "/" + params.object_id;
-
- if (params.object_type != "node") {
- url += "/full";
- }
-
- $(window).load(function() { addObjectToMap(url, params.object_zoom) });
+ addObjectToMap(params.object, params.object_zoom);
}
handleResize();
var extents = unproj(map.getExtent());
var expiry = new Date();
- updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top, params.object_type, params.object_id);
+ updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top, params.object);
expiry.setYear(expiry.getFullYear() + 10);
$.cookie("_osm_location", [lonlat.lon, lonlat.lat, zoom, layers].join("|"), {expires: expiry});