Skip to main content
Table of Contents

TTMSFNCHere Class

Displays interactive HERE maps with markers, shapes, heat maps, and browser-backed provider services.

API unit family: TMSFNCHere Inherits from: TTMSFNCCustomHere

Syntax

GeneratedPascalC++
TTMSFNCHere = class(TTMSFNCCustomHere)
class PASCALIMPLEMENTATION TTMSFNCHere : public TTMSFNCCustomHere

Properties

Name Description
HeatMaps Provides access to the heat maps displayed on the map. (inherited from TTMSFNCCustomHere)
Options Provides access to the provider-specific map options. (inherited from TTMSFNCCustomHere)
Polygons Provides access to the polygons displayed on the map. (inherited from TTMSFNCCustomHere)

Methods

Name Description
AddBridge Adds a bridge object for browser communication.
AddHeatMap Adds a heat-map overlay to the map. (inherited from TTMSFNCCustomHere)
AddPolygon Adds a polygon overlay to the map. (inherited from TTMSFNCCustomHere)
CanGoBack Returns whether browser history can navigate back.
CanGoForward Returns whether browser history can navigate forward.
CaptureScreenShot Captures a screenshot of the browser surface.
ClearCache Clears the browser cache.
ClearHeatMaps Removes all heat-map overlays from the map. (inherited from TTMSFNCCustomHere)
DeInitialize Releases the browser and map surface.
EndUpdate Ends a batched update and refreshes provider-specific overlays. (inherited from TTMSFNCCustomHere)
ExecuteJavaScript Executes JavaScript in the browser surface.
ExecuteJavaScriptSync Executes JavaScript synchronously and returns its result.
GoBack Navigates back in browser history.
GoForward Navigates forward in browser history.
Initialize Initializes the browser and map surface.
IsFMXBrowser Returns whether the active browser is the framework browser.
LoadFile Loads a local file into the browser surface.
LoadHTML Loads HTML content into the browser surface.
NativeBrowser Returns the native browser pointer.
NativeDialog Returns the native dialog pointer.
NativeEnvironment Returns the native browser environment pointer.
Navigate Navigates to the configured map URL.
Reload Reloads the browser surface.
RemoveBridge Removes a browser communication bridge.
ShowDebugConsole Shows the browser debug console.
StopLoading Stops the current browser load operation.

Usage examples

Add the first HERE marker

Assigns a HERE API key and adds a marker to a TTMSFNCHere instance.

Add the first HERE markerPascal
procedure TForm1.AddMunichMarker;
var
  LMarker: TTMSFNCMapsMarker;
begin
  TMSFNCHere1.APIKey := '<your HERE platform API key>';

  LMarker := TMSFNCHere1.Markers.Add;
  LMarker.Coordinate.Latitude := 48.1351;
  LMarker.Coordinate.Longitude := 11.5820;
  LMarker.Title := 'Munich';
end;

Read the related guide

Combine HERE style, labels, HeatMaps, and right-click events

Builds a HERE scene with Options.MapStyle, Tilt, Heading, Labels, HeatMaps, and events.

Combine HERE style, labels, HeatMaps, and right-click eventsPascal
procedure TForm1.BuildHereOperationsScene;
var
  LMarker: TTMSFNCMapsMarker;
  LHeatMap: TTMSFNCHereHeatMap;
  LWeightedCoordinate: TTMSFNCMapsWeightedCoordinate;
begin
  TMSFNCHere1.BeginUpdate;
  try
    TMSFNCHere1.APIKey := '<your HERE platform API key>';
    TMSFNCHere1.Options.MapStyle := hmsLogistics;
    TMSFNCHere1.Options.Tilt := 55;
    TMSFNCHere1.Options.Heading := 90;

    LMarker := TMSFNCHere1.Markers.Add;
    LMarker.Coordinate.Latitude := 52.52;
    LMarker.Coordinate.Longitude := 13.405;
    LMarker.Title := 'Berlin depot';

    TMSFNCHere1.AddLabel(52.52, 13.405, 'Berlin depot', gcWhite, gcDarkgreen);

    LHeatMap := TMSFNCHere1.HeatMaps.Add;
    LHeatMap.Opacity := 0.45;
    LWeightedCoordinate := LHeatMap.WeightedCoordinates.Add;
    LWeightedCoordinate.Coordinate.Latitude := 52.52;
    LWeightedCoordinate.Coordinate.Longitude := 13.405;
    LWeightedCoordinate.Weight := 0.8;

    TMSFNCHere1.OnMapRightClick := TMSFNCHere1MapRightClick;
    TMSFNCHere1.OnMarkerRightClick := TMSFNCHere1MarkerRightClick;
    TMSFNCHere1.OnPolyElementRightClick := TMSFNCHere1PolyElementRightClick;
  finally
    TMSFNCHere1.EndUpdate;
  end;
end;

Read the related guide

Handle HERE right-click events

Wires OnMapRightClick, OnMarkerRightClick, and OnPolyElementRightClick events.

Handle HERE right-click eventsPascal
procedure TForm1.ConfigureHereContextEvents;
begin
  TMSFNCHere1.OnMapRightClick := TMSFNCHere1MapRightClick;
  TMSFNCHere1.OnMarkerRightClick := TMSFNCHere1MarkerRightClick;
  TMSFNCHere1.OnPolyElementRightClick := TMSFNCHere1PolyElementRightClick;
end;

procedure TForm1.TMSFNCHere1MapRightClick(Sender: TObject;
  AEventData: TTMSFNCMapsEventData);
begin
  { Show a map-level context menu at AEventData.Coordinate. }
end;

procedure TForm1.TMSFNCHere1MarkerRightClick(Sender: TObject;
  AEventData: TTMSFNCMapsEventData);
begin
  if Assigned(AEventData.Marker) then
    AEventData.Marker.Title := 'Selected marker';
end;

procedure TForm1.TMSFNCHere1PolyElementRightClick(Sender: TObject;
  AEventData: TTMSFNCMapsEventData);
begin
  if Assigned(AEventData.PolyElement) then
    AEventData.PolyElement.DataString := 'Selected poly element';
end;

Read the related guide