summaryrefslogtreecommitdiff
path: root/htdocs/streeteditor.js
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/streeteditor.js')
-rw-r--r--htdocs/streeteditor.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/htdocs/streeteditor.js b/htdocs/streeteditor.js
index ced38ea..53f9b52 100644
--- a/htdocs/streeteditor.js
+++ b/htdocs/streeteditor.js
@@ -76,6 +76,13 @@ if (editor_mode) {
polyline = L.polyline(coords).addTo(mymap);
// polyline.on('dragend', onDragEnd); // TODO: Doesn't work, see "workaround" below
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);
+ console.log("NEW=" + latlng);
+ jump_to(latlng, 8);
+ }
}
}