}
if (params.object) {
- addObjectToMap({type: params.object_type, id: params.object_id}, 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.type, params.object.id);
expiry.setYear(expiry.getFullYear() + 10);
$.cookie("_osm_location", [lonlat.lon, lonlat.lat, zoom, layers].join("|"), {expires: expiry});
}
if (params.node || params.way || params.relation) {
- mapParams.object = true;
mapParams.object_zoom = true;
if (params.node) {
- mapParams.object_type = 'node';
- mapParams.object_id = parseInt(params.node);
+ mapParams.object = {type: 'node', id: parseInt(params.node)};
} else if (params.way) {
- mapParams.object_type = 'way';
- mapParams.object_id = parseInt(params.way);
+ mapParams.object = {type: 'way', id: parseInt(params.way)};
} else if (params.relation) {
- mapParams.object_type = 'relation';
- mapParams.object_id = parseInt(params.relation);
+ mapParams.object = {type: 'relation', id: parseInt(params.relation)};
}
}