Skip to content

Commit 211dbb7

Browse files
authored
Merge pull request #6 from amit-y11/master
fix search result
2 parents d69d218 + 823914a commit 211dbb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ $(document).ready(function(){
275275
function search() {
276276
$.get('https://nominatim.openstreetmap.org/search?q='+sanitize($("#search-box input").val())+'&format=json', function(data) {
277277
// Navigate to the first result of the search query
278-
map.panTo(new L.LatLng(data[0].lat, data[1].lon));
278+
map.panTo(new L.LatLng(data[0].lat, data[0].lon));
279279
})
280280
}
281281

0 commit comments

Comments
 (0)