Hello Team,
Can we load .mbtiles as basemaps?
Thanks,
Girish
Hello Girish,
Thank you for getting in touch! Unfortunately, we do not support the .mbtiles format out of the box.
However, the ImageTiledLayer class can be extended to support this format; and this can be done both in C++ and QML:
ImageTiledLayer Class | ArcGIS for Developers
ImageTiledLayer QML Type | ArcGIS for Developers
Alas, we do not seem to have a sample that showcases this behaviour but it is feasible within ArcGIS, as I found an Android sample, written in Java, which does make use of an .mbtiles format: Local MBTiles | ArcGIS for Developers
Please note that the handling of the SQLite datafile reading has to be implemented on your side.
Hope this helps,Marton
Thank you for your reply ...I was referring to that only but map is not properly being loaded .
Problems are as below,
1) The android app using TiledServiceLayer
whereas in arcgis runtie for qt I am using ImageTiledLayer
2)Android app says The class exposes a protected abstract method, getTile(), to fetch tiles. This sample extends this class and implements the getTile() method to create a layer by fetching MBTiles from a SQLite database.
getTile()
whereas Whereas ImageTiledLayer in qt arcgis runtime has no such method.
Thanks for your reply. I had a look into it and sure enough the Java sample is an old 10.2.x version; currently in our 100.x we do thing differently.
The ImageTiledLayer class can still be subclassed, within which you would connect to the tileRequest signal. This signal is emitted when tiles are requested and inside its callback the following three functions can be called: setNoDataTile, setTileData, and setTileError. This setTileData function is the one which updates the tiles to the ones which are extracted from the mbtiles file.
Hope this help,
Marton
Hello Marton,
Thank you for your reply I am really happy to see it is possible.
I am currently using same methods...
I am trying to load world_countries.mbtiles which are provided as sample
Can you please check attached code and output images of same where tiles are not properly displayed.
Thank you,
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.