Lazarus Code and Component Repository Plugins for TMapView
This is a feature request covering several ideas and requests from others into one extension:
Plugins for the TMapView component.
The MapViewer-Projects made a big step forward und works very fine. But it lacks from several subitems, like a legal notice (copyright), incl. link to the map provider, a scale to get an impression of distance, but also additional buttons to manipulate zoom and location. This additional items would be put an additional load into the development of the main component, especially, because those items would need to be maintained. My proposal / feature request solve this needs by adding a simple Plugin-Manager to the TMapView, where new instances of special derived classes could be inserted and do theri work. This would keep the main component free of minor tasks and allows a separate development of plugins, having all their own maintaining, without bothering the main component development team.
The basic idea is to forward all existing Events and Notifications (Mouse, Zoom, Change) plus some new one (OnBefore/OnAfterPaint, OnPaintTile) to the PlugIn-Manager, which distribute this events to the plugins and finally to the user assigned Event-Handler. The plugins can notice or consume (like the MouseDown-event) this events and interact with the MapView.
As an very simple example one Plugin may print a simple Copyright notice in one of the corners of the map dsiplay and react to a click with open the default browser. A much more complicated plugin may allow the temporary relocation of close placed / or overlayed markers to allow a better selecting and finally a very complicate plugin may replace the GPSObjects to allow the usage of thousands of markers including grouping them together (e.g. Busstops and railway stations, platforms etc.).
IMHO the impact into the TMapView-component is not very heavy. But as I am not a skilled components designer, I may underestimate the work load to get stuff integrated into the Lazarus-IDE for an easier operation for novice or less skilled users, by simple pnp existings Plugins inside the IDE without the need for writing much code.
Attached you will find an running example for a Pluginmanager and a simple plugin, which may explain better in code than in words what I am propose. This example does not integrate anything into the ide, everything is done inside the code, but is shows, how to keep the details away from the avreage consuming programmer.
Best regards Ekkehard