DoAfterDraw missing Unit declaration

Hello!
When assigning an event to MSFNCMaps1.AfterDraw the class TRectF is undefined.
Tried to add LCLTMSFNCTypes to the Uses but then I get compilation eror in LCLTMSFNCDefines.inc at line "{$mode objfpc}{$H+}{$modeswitch advancedrecords}"
[dcc32 Error] LCLTMSFNCDefines.inc(7): E1030 Invalid compiler directive: 'mode'
Please help.

Hi,

Based on the error we see that you are using Delphi. If you are using FMX or VCL you can use the System.Types unit.

LCL* units are specific for Lazarus IDE

Ok, that worked, but it doesn't fire!? I'm looking for an event that fires when the map is fully loaded.

Hi,

The TMS FNC Maps is an atypical component. The OnAfterDraw is not triggered because the rendering happens in a native Edge Chromium browser control. Other events such as keyboard and mouse events are also not triggered. Only a handful events are exposed that work, the other events are inherited from TTMSFNCCustomControl.

When the map is loaded, the OnMapInitialized event is triggered, this event can be used to determine when the map is loaded.