I have recently added the MapView component and would like to know how to put a red dot or flag or something on the map be viewed in the component?
Mailing lists / lazarus / 2026-03
MapView Component on Lazarus
2 messages · 2 people ·
- TTerry A. Haimann 1
- WWerner Pamler 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Terry A. Haimann wroteI have recently added the MapView component and would like to know how to put a red dot or flag or something on the map be viewed in the component?
It is explained in the wiki:
https://wiki.lazarus.freepascal.org/LazMapViewer#Map_Overlays, and more specifically
https://wiki.lazarus.freepascal.org/LazMapViewer#Overlaying_a_layer_with_points-of-interest.
In short:
* In the object inspector, having the MapView selected, click on the '...' next to the "Layers" property to open the Layer editor.
* Click "Add" to create a new layer.
* In the object tree of the object inspector click on "PointsOfInterest" of the new layer, right-click, "Add" again to add a point of interest
* Select the newly created item "0 - TMapPointOfInterest" and fill in its properties:
o Caption - the text displayed below the point
o Longitude, Latitude - the location of the point in GPS coordinates o ImageIndex - the index of the image that you want to display here. Note that you must assign a TImageList to the POIImages property of the MapView which contains all the needed images. Find a large selection of marker images in the installation directory of the package (the images were kindly provided by Roland Hahn).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20260309/a9c34028/attachment.htm>
