The OnKMLLayerClick event in TTMSFNCGoogleMaps returns the center of the KML coordinates

When clicking over a KML loaded in TTMSFNCGoogleMaps the OnKMLLayerClick event in TTMSFNCGoogleMaps returns the center of the KML coordinates in the AEventData( TTMSFNCMapsEventData) variable.

Is it possible to retrieve the exact location of the OnCLick Event?

I have seen in another post that the OnMouseDown and OnMapClick events are disabled when an OnKMLLayerClick is fired .

Hi,

The AEventData.Coordinate value should contain the exact location that was clicked.

This sample adds a marker at the exact location that was clicked:

procedure TForm1.TMSFNCGoogleMaps1KMLLayerClick(Sender: TObject;
  AEventData: TTMSFNCMapsEventData);
begin
  TMSFNCGoogleMaps1.AddMarker(AEventData.Coordinate.ToRec);
end;