fmx WebOsMaps offline

Hi all,
I'm new to  this compnent but I developped an Android App (with Dellphi 10.2 Tokyo) that need to sho an offline (no internet use) map of a limited zone (1 square km)

I don't know how to use the a local copy of the map (I have the osm file)

Can anyone please help me?

Thank you

Pietro Ruvolo


Please note that there is currently no support for offline maps in TMS WebOSMaps.
Hi , Thank you for your answer,
can you at least explain to me how to configure fhe MapOption.TilesURL property in order to read PNG files already on the disk?

Usage of the TileServerUrl property is explained in the PDF manual available from the product page:

Note that this property is intended to be used with webserver URLs only. You might want to try if it works with local path as well.
In fact, there is the way to run TMS WebOSMaps in offline mode.
Of course you need to have your local tile server, but not only.

Developers are decide to stay this kind of strange hardcode inside of component:

  remoteCSS := '';
  remoteJS := '';
  remoteJS := '';
  remoteIMG := '';

It means, you also need to have your local web-server with support code above, and deceive your operating system like that:

#file hosts

I do not understand why the developers did not specify it in the documentation.


To use a custom URL for the OpenLayers JS library you can use the MapOptions.ScriptURL property.
Usage of the ScriptURL property is explained in the TMS VCL WebOSMaps PDF manual under the "TWebOSMaps.MapOptions properties" topic.
I think,We can use offline mapping ,you need to download maptile first , save it in your disk, then you can set  TileServerURL by yourself ,i tested it succefull on Windows ,example :
or TMSFMXWebOSMaps1.MapOptions.TileServerURL.Add('C:\\Users\\Administrator\\Pictures\\map\\maptile\\googlemaps\\hybrid\\${z}\\${x}\\${y}.jpg');