X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/824a474d933a3f5010717dd41097e65a25f8130c..00375024263970a43ea7d39e3c65dfd0f32e8869:/app/assets/javascripts/browse.js?ds=inline diff --git a/app/assets/javascripts/browse.js b/app/assets/javascripts/browse.js index 9858db091..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();