diff options
Diffstat (limited to 'htdocs/streeteditor.js')
-rw-r--r-- | htdocs/streeteditor.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/htdocs/streeteditor.js b/htdocs/streeteditor.js index 6c20e23..4ade184 100644 --- a/htdocs/streeteditor.js +++ b/htdocs/streeteditor.js @@ -9,6 +9,14 @@ if (editor_mode) { var polyline; var edit_active = 0; + + var editor_style = { + radius: 8, + fillColor: "#00ff00", + color: "red", + opacity: 1.0, + fillOpacity: 0.5 + }; function start_editing(dir = 1) { // TODO: Check whether we already are in edit mode @@ -73,9 +81,9 @@ if (editor_mode) { coords[i] = [coords[i][1], coords[i][0]]; } if (editor_mode_polygon) - polyline = L.polygon([coords]).addTo(mymap); + polyline = L.polygon([coords], editor_style).addTo(mymap); else - polyline = L.polyline(coords).addTo(mymap); + polyline = L.polyline(coords, editor_style).addTo(mymap); // polyline.on('dragend', onDragEnd); // TODO: Doesn't work, see "workaround" below polyline.enableEdit(); if (interactive) { |