X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/97c572b92f5e09d646ce045a949e40d53f87243a..f2a2c29815768171406587b7bc528f5033ec9b8f:/website/js/nominatim-ui.js diff --git a/website/js/nominatim-ui.js b/website/js/nominatim-ui.js index bb4fa377..b99def9a 100644 --- a/website/js/nominatim-ui.js +++ b/website/js/nominatim-ui.js @@ -165,14 +165,18 @@ jQuery(document).on('ready', function(){ var layerGroup = new L.layerGroup().addTo(map); - - var outline = omnivore.wkt.parse(nominatim_result.outlinestring); - map.addLayer(outline); - var circle = L.circleMarker([nominatim_result.lat,nominatim_result.lon], { radius: 10, weight: 2, fillColor: '#ff7800', color: 'blue', opacity: 0.75}); map.addLayer(circle); - map.fitBounds(outline.getBounds()); + if ( nominatim_result.outlinestring ){ + var outline = omnivore.wkt.parse(nominatim_result.outlinestring); + map.addLayer(outline); + map.fitBounds(outline.getBounds()); + } else { + map.setView([nominatim_result.lat,nominatim_result.lon],10); + } + + });