Description


Property for working with markers on the map. Allows you to create/modify/delete markers on the map.


 Methods and properties

 Description

 function Add(Latitude, Longitude: Double): TMarker

 Creates a new marker on the map.

 function Bounds: TBounds

 Returns the coordinates of the rectangular area in which all markers are located.

 procedure Clear

 Removes all markers on the map and from the collection (TMarkers).

 property Count: Integer

 Returns the number of markers in the collection (TMarkers).

 procedure Delete(Index: Integer)

 Removes the specified marker from the map and from the collection of markers (TMarkers).

 property Items[i]: TMarker

 Returns the specified marker.





Example


//Create a marker on the map
var
  Marker: TMarker;
  i: integer;
  id: integer;
begin
  // Create a marker on the map with specified coordinates
  Marker := Form1.Map1.Markers.Add(48.858137, 2.294476);
 



  // Set the map zoom to fit all existing markers
  Form1.Map1.MapZoomTo(Form1.Map1.Markers.Bounds);