Editing TTMSFNCGoogleMapsPolygon

How can I delete a vertex when graphically editing a TTMSFNCGoogleMapsPolygon?

Unfortunately it is currently not supported to remove a vertex when editing a polygon on the map.
However, this is a good suggestion and we'll investigate if this feature can be added in a future version.

Thanks. If doing things graphically, one should be able to do all reasonable actions graphically. For this action, I'm probably going to have to

  1. create a textual list/table of vertices, and delete and redraw from that, or
  2. react to the Delete key, and delete the closest vertex to the cursor position, or
  3. something else that a user would find quasi-intuitive and/or very clear

Has anyone got any clever ideas? :smiley:

Please note that TTMSFNCGoogleMaps currently only supports the default functionality to edit Polylines/Polygons that is offered by the Google Maps JavaScript API which does not include a delete function.

To enable vertex deleting the Google doc suggests adding custom JavaScript to display a delete menu when right-clicking on a vertex:

It would be really very nice if I could get a right-click menu with a polyelement vertex delete function implemented. However, I have no experience with JavaScript, or any clue of how to get going with the above Google doc suggestion.

I am, however, very good at copying (and/or modifying) code examples. :)

If anyone has a short Delphi example project of how the above could be done, it would be very much appreciated.

FNC maps includes many events that may be used for creating map provider independent solution for editing polygons, polylines, etc,
for example, I used FNC maps / Delphi to replace old VS solution which was based on IE and Google API.
now we can edit polygons in DB directly, switch maps on the fly, and can implement any "custom" data processing logic when editing maps.