X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/824a474d933a3f5010717dd41097e65a25f8130c..73b59c5859ab128f61a456699f3c809bbb15558a:/app/assets/javascripts/browse.js 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();