}
if (params.object) {
- addObjectToMap({type: params.object_type, id: params.object_id}, params.object_zoom);
+ addObjectToMap(params.object, params.object_zoom);
}
handleResize();
- $("#show_data").click(function (e) {
- $.ajax({ url: $(this).attr('href'), success: function (sidebarHtml) {
- startBrowse(sidebarHtml);
- }});
- e.preventDefault();
- });
-
$("body").on("click", "a.set_position", function () {
var data = $(this).data();
var centre = new OpenLayers.LonLat(data.lon, data.lat);
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});
map.setCenter(centre, zoom);
});
- $("#exportanchor").click(function (e) {
- $.ajax({ url: $(this).data('url'), success: function (sidebarHtml) {
- startExport(sidebarHtml);
- }});
- e.preventDefault();
- });
-
- if (window.location.pathname == "/export") {
- $("#exportanchor").click();
- }
-
$("#search_form").submit(function () {
var extent = unproj(map.getExtent());