X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d3c883f1b5e1db91997ec5c4fe4a631e7135dc3f..e598e2ceed58f03942f12203611ccc2e20fec66d:/lib/template/search-html.php?ds=sidebyside diff --git a/lib/template/search-html.php b/lib/template/search-html.php index a9d328a8..89e4800b 100644 --- a/lib/template/search-html.php +++ b/lib/template/search-html.php @@ -208,7 +208,7 @@ form{ map.panTo(lonLat, ); } - function panToLatLonZoom(lat,lon, zoom) { + function panToLatLonZoom(lat, lon, zoom) { var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()); if (zoom != map.getZoom()) map.setCenter(lonLat, zoom); @@ -220,6 +220,8 @@ form{ var proj_EPSG4326 = new OpenLayers.Projection("EPSG:4326"); var proj_map = map.getProjectionObject(); map.zoomToExtent(new OpenLayers.Bounds(minlon,minlat,maxlon,maxlat).transform(proj_EPSG4326, proj_map)); + var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()); + map.panTo(lonLat, ); var pointList = []; var style = { @@ -317,7 +319,7 @@ form{