Delphi FMX Leaflet Plotter using OSM Maps
Delphi FMX standard components:- Toolbar, Browser, buttons and memo. This could easily be used in a VCL application.
Leaflet plotter is found in Github is just one of these add-on libraries which allows plotting onto a leaflet map.
Scriptgate is a fantastic call-back light-weight library that allows Delphi to communicate with the Browser by overcoming the CORS restriction in the cross platform browser component. First install the component through the Gettit Manager and only then can you compile the example.
Feel free to download the code.
Running the Project
Ensure that you have connection to the Internet before running the Application as it needs to call the OSM Maps to download the correct tile(s) to be viewed in the browser.
The plotting is essential a new map overlay. A left click will add a plotted point and update the plotted points list. This point can be repositioned with left mouse-down and dragged.
Double clicking the point will delete the point and update the internal plotted points list.
Read the Blog:- Delphi-FMX-leaflet-plotter-using-OSM-Maps to understand how the code works.