DoAfterDraw missing Unit declaration

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 at line "{$mode objfpc}{$H+}{$modeswitch advancedrecords}"
[dcc32 Error] E1030 Invalid compiler directive: 'mode'
Please help.


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.


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.