Skip to main content
Table of Contents

Getting started with TMS FNC MapBox

Prerequisites

  • TMS FNC Core installed and the runtime package added to the project.
  • TMS FNC Maps installed and the runtime package added to the project.
  • A MapBox public access token.

Add the control

  1. Drop TTMSFNCMapBox from the TMS FNC Maps palette page onto a form.
  2. Set the APIKey property to your MapBox access token.

Add a marker

Add the first MapBox markerPascalC++
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";
}

Next steps