rogalmic / flight-planner

Interactive VFR flight planning online.
https://rogalmic.github.io/flight-planner/flight.html
MIT License
5 stars 3 forks source link

Add capability to edit route #12

Closed starnutoditopo closed 2 years ago

starnutoditopo commented 2 years ago

It would be nice to be able to edit the route, once created. It should be possible to:

As an example, see Leaflet 1.0+ Examples's full demo

OpenLayers already provides this capability: see the "Draw and Modify Features" demo

starnutoditopo commented 2 years ago

The Modify interaction can be used. such as these lines in flight.html, after line 251:

const modify = new ol.interaction.Modify({source: source});
map.addInteraction(modify);

The code above, however, doesn't behave correctly when locating the point in the geometry.

Maybe the "Draw and Modify Geodesic Circles" example can be useful.

rogalmic commented 2 years ago

Added in https://github.com/rogalmic/flight-planner/pull/14 , please test if possible