Macos images on map with Delphi


I am trying to show custom markers on my macos build with Delphi 11, and the icons are not able to show up. I tried adding them to the package manually in the contents, contents/macos, and root folder of the application with no success. It works well on Windows 32 and 64 bits. Any ideas?

Thank you so much!

Can you try with LocalFileAccess set to true? If that is not working, please convert your images to a base64 string and use that string instead.

LocalFileAccess is set to true, and works fine on the Windows builds (32 and 64 bits). Is there a sample on the base64 conversion and how to pass the png as a string? Do I just pass it as the parameter for the filename on the AddMarker function for the TMSFNCMapBox instance?

Thank you!


For example, you can use the following code:

  b64: string;
  b64 := 'data:image/png;base64,' + TTMSFNCUtils.FileToBase64('C:\MyMarker.png');
  TMSFNCMapBox1.AddMarker(lat, lon, 'title', b64);
1 Like

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.