Skip to main content
Table of Contents

TTMSFNCGoogleMaps.Options Property

Configures map behavior and appearance.

API unit family: TMSFNCGoogleMaps Declaring type: TTMSFNCGoogleMaps Inherited from: TTMSFNCCustomGoogleMaps Type: TTMSFNCGoogleMapsOptions

Syntax

FMX.TMSFNCGoogleMaps.hppPascalC++
property Options: TTMSFNCGoogleMapsOptions;
__property TTMSFNCGoogleMapsOptions* Options = {read=GetOptions, write=SetOptions};

Usage examples

Configure StreetView Coordinate, Location, and state events

Sets StreetView Coordinate and Location and handles OnStreetViewEnabledChange.

Configure StreetView Coordinate, Location, and state eventsPascalC++
procedure TForm1.ConfigureGoogleMapsStreetView;
begin
  TMSFNCGoogleMaps1.Options.ShowStreetViewControl := True;
  TMSFNCGoogleMaps1.Options.StreetView.Location := slCoordinate;
  TMSFNCGoogleMaps1.Options.StreetView.Coordinate.Latitude := 40.6892;
  TMSFNCGoogleMaps1.Options.StreetView.Coordinate.Longitude := -74.0445;
  TMSFNCGoogleMaps1.Options.StreetView.Heading := 120;
  TMSFNCGoogleMaps1.Options.StreetView.Pitch := 0;
  TMSFNCGoogleMaps1.Options.StreetView.Zoom := 1;
  TMSFNCGoogleMaps1.Options.StreetView.Enabled := True;
  TMSFNCGoogleMaps1.OnStreetViewEnabledChange :=
    TMSFNCGoogleMaps1StreetViewEnabledChange;
end;

procedure TForm1.TMSFNCGoogleMaps1StreetViewEnabledChange(Sender: TObject;
  AEventData: TTMSFNCMapsEventData;
  AStreetViewData: TTMSFNCGoogleMapsStreetViewData);
begin
  { Use AStreetViewData.Enabled to synchronize external UI state. }
end;
void __fastcall TForm1::ConfigureGoogleMapsStreetView()
{
  TMSFNCGoogleMaps1->Options->ShowStreetViewControl = true;
  TMSFNCGoogleMaps1->Options->StreetView->Location = slCoordinate;
  TMSFNCGoogleMaps1->Options->StreetView->Coordinate->Latitude = 40.6892;
  TMSFNCGoogleMaps1->Options->StreetView->Coordinate->Longitude = -74.0445;
  TMSFNCGoogleMaps1->Options->StreetView->Heading = 120;
  TMSFNCGoogleMaps1->Options->StreetView->Pitch = 0;
  TMSFNCGoogleMaps1->Options->StreetView->Zoom = 1;
  TMSFNCGoogleMaps1->Options->StreetView->Enabled = true;
  TMSFNCGoogleMaps1->OnStreetViewEnabledChange =
    TMSFNCGoogleMaps1StreetViewEnabledChange;
}

void __fastcall TForm1::TMSFNCGoogleMaps1StreetViewEnabledChange(TObject *Sender,
  TTMSFNCMapsEventData *AEventData,
  TTMSFNCGoogleMapsStreetViewData AStreetViewData)
{
  // Use AStreetViewData.Enabled to synchronize external UI state.
}

Read the related guide