X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e4ef507c5c56ab1f700a04c099f6938a143f836f..361906af9e5a7209af3f7006acbd117ed7b85e24:/app/assets/javascripts/browse.js?ds=sidebyside diff --git a/app/assets/javascripts/browse.js b/app/assets/javascripts/browse.js index e98aa2ed6..08b355991 100644 --- a/app/assets/javascripts/browse.js +++ b/app/assets/javascripts/browse.js @@ -41,6 +41,22 @@ $(document).ready(function () { }); updatelinks(centre.lon, centre.lat, 16, null, params.minlon, params.minlat, params.maxlon, params.maxlat); + } else if (params.type == "note") { + var centre = new OpenLayers.LonLat(params.lon, params.lat); + + setMapCenter(centre, 16); + addMarkerToMap(centre); + + var bbox = getMapExtent(); + + $("#loading").hide(); + $("#browse_map .geolink").show(); + + $("a[data-editor=remote]").click(function () { + return remoteEditHandler(bbox); + }); + + updatelinks(centre.lon, centre.lat, 16, null, bbox.left, bbox.bottom, bbox.right, bbox.top) } else { $("#object_larger_map").hide(); $("#object_edit").hide(); @@ -56,7 +72,7 @@ $(document).ready(function () { $("#browse_map .geolink").show(); if (extent) { - extent.transform(map.getProjectionObject(), map.displayProjection); + extent = unproj(extent); var centre = extent.getCenterLonLat(); @@ -71,7 +87,7 @@ $(document).ready(function () { $("#object_larger_map").show(); $("#object_edit").show(); - updatelinks(centre.lon, centre.lat, 16, null, extent.left, extent.bottom, extent.right, extent.top, params.type, params.id); + updatelinks(centre.lon, centre.lat, 16, null, extent.left, extent.bottom, extent.right, extent.top, object); } else { $("#small_map").hide(); }