diff options
Diffstat (limited to 'htdocs/streeteditor.js')
-rw-r--r-- | htdocs/streeteditor.js | 3 |
1 files changed, 1 insertions, 2 deletions
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); } |