How to Load OSM Tiles offline in qt CPP

1832
4
07-21-2019 11:48 PM
Girishchandra_Yendargaye
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)
0 Kudos
4 Replies
LucasDanzinger
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.

0 Kudos
GirishchandraY
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 !

0 Kudos
LucasDanzinger
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

0 Kudos
GirishchandraY
New Contributor II

Can you make it run for attached tiles?

0 Kudos