TTMSFNCGoogleMaps.Markers Property
Returns marker references assigned to the item.
API unit family: TMSFNCGoogleMaps
Declaring type: TTMSFNCGoogleMaps
Inherited from: TTMSFNCCustomGoogleMaps
Type: TTMSFNCGoogleMapsMarkers
Syntax
property Markers: TTMSFNCGoogleMapsMarkers;
__property TTMSFNCGoogleMapsMarkers* Markers = {read=GetMarkers, write=SetMarkers};
Usage examples
Add the first Google Maps marker
Assigns an API key and adds a marker to a TTMSFNCGoogleMaps instance.
procedure TForm1.AddLondonMarker;
var
LMarker: TTMSFNCGoogleMapsMarker;
begin
TMSFNCGoogleMaps1.APIKey := '<your Google Maps JavaScript API key>';
LMarker := TMSFNCGoogleMaps1.Markers.Add;
LMarker.Coordinate.Latitude := 51.5074;
LMarker.Coordinate.Longitude := -0.1278;
LMarker.Title := 'London';
end;
void __fastcall TForm1::AddLondonMarker()
{
TMSFNCGoogleMaps1->APIKey = "<your Google Maps JavaScript API key>";
TTMSFNCGoogleMapsMarker *LMarker = TMSFNCGoogleMaps1->Markers->Add();
LMarker->Coordinate->Latitude = 51.5074;
LMarker->Coordinate->Longitude = -0.1278;
LMarker->Title = "London";
}