How to Load OSM Tiles offline in qt CPP

535
4
07-21-2019 11:48 PM
Highlighted
New Contributor III

Hello Team,

I have set of OSM tiles in PNG format.

Now I want it to basemap or operational layers.

Can you please tell the process for same.

Thank you,

Tags (1)
Reply
0 Kudos
4 Replies
Highlighted
Esri Frequent Contributor

You can subclass ServiceImageTiledLayer like explained in the detailed description here - https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-serviceimagetiledlayer....

Attached is a working example hitting the online URLs. You should be able to modify the code to point to local file URLs instead of online URLs. Make sure to update the full extent and tile info to match your tile cache.

Reply
0 Kudos
Highlighted
New Contributor II

Can you please tell how to create this  local file URLs ....

I have around 55 images with name like osm_100-l-1-12-2940-1847.png

Thanks !

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

for local URLs you can use the `file:///` prefix instead of `http://`

To update the name, modify the custom image tiled layer URL in the setTileRequest function

Reply
0 Kudos
Highlighted
New Contributor II

Can you make it run for attached tiles?

Reply
0 Kudos