From bfaacd813be434e4146e824c793aa4f73711a84a Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sun, 19 Apr 2020 23:09:26 +0200 Subject: Add street names to search --- htdocs/streeteditor.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'htdocs/streeteditor.js') diff --git a/htdocs/streeteditor.js b/htdocs/streeteditor.js index 53f9b52..340a10a 100644 --- a/htdocs/streeteditor.js +++ b/htdocs/streeteditor.js @@ -78,8 +78,7 @@ if (editor_mode) { polyline.enableEdit(); if (interactive) { console.log(coords); - latlng = L.latLng(coords[0][0] + (coords[coords.length - 1][0] - coords[0][0]) / 2, - coords[0][1] + (coords[coords.length - 1][1] - coords[0][1]) / 2); + latlng = L.latLng(polyline_get_middle_coords(coords)); console.log("NEW=" + latlng); jump_to(latlng, 8); } -- cgit v1.2.3