TTMSFNCMapBox.Markers Property
Contains the marker overlays displayed by the map.
API unit family: TMSFNCMapBox
Declaring type: TTMSFNCMapBox
Inherited from: TTMSFNCCustomMapBox
Type: TTMSFNCMapBoxMarkers
Syntax
property Markers: TTMSFNCMapBoxMarkers;
__property TTMSFNCMapBoxMarkers* Markers = {read=GetMarkers, write=SetMarkers};
Usage examples
Add the first MapBox marker
Adds a marker to a TTMSFNCMapBox instance after the API key has been assigned.
procedure TForm1.AddParisMarker;
var
LMarker: TTMSFNCMapBoxMarker;
begin
TMSFNCMapBox1.APIKey := '<your MapBox access token>';
LMarker := TMSFNCMapBox1.Markers.Add;
LMarker.Coordinate.Latitude := 48.8566;
LMarker.Coordinate.Longitude := 2.3522;
LMarker.Title := 'Paris';
end;
void __fastcall TForm1::AddParisMarker()
{
TMSFNCMapBox1->APIKey = "<your MapBox access token>";
TTMSFNCMapBoxMarker *LMarker = TMSFNCMapBox1->Markers->Add();
LMarker->Coordinate->Latitude = 48.8566;
LMarker->Coordinate->Longitude = 2.3522;
LMarker->Title = "Paris";
}