I would like to "clip" existing basemaps to display along with my mmpk. I was able to download osm tiles for the area I am interested in but I can't find any info on how or if I can bring that into my project. I've also looked at the services like the World Light Gray Base (for Export) but there is no direction on how to add that as a local basemap. I am developing in Qt with QML. I am able to display my mobile map package data along with some locators but I can't get local basemaps to work.
In AppStudio, we are using ArcGIS Runtime SDK for Qt for all of the mapping capabilities. I think what you are looking to do is very similar to the "On Demand" offline workflow, where you can define an area of a map and control the map content to be taken offline, including the basemap. Please take a look at this documentation regarding Take a map offline - on-demand—ArcGIS Runtime SDK for Qt | ArcGIS for Developers
Thank you for your reply. Actually I do not want to have the maps downloaded on demand. I want to package the maps, basemap, and locators to include with the app download. I'm creating an app that will be used in areas that typically has spotty network access. I read somewhere that this can be created in ArcGIS Pro (creating a .vtpk file for example) but I could never get it to work.
This sample shows you how to create and use the TPK file, which can be generated from ArcGis Pro, Generate offline map with local basemap | ArcGIS for Developers and here is the doc for TiledLayer, ArcGISTiledLayer QML Type | ArcGIS for Developers
So it looks like you are having an issue creating the tpk or vtpk file from ArcGIS Pro to be used as Runtime content, correct?
I was able to create a tpk file from ArcGIS Pro. I just can't get it to show while using a mmpk. Do I have to package it with the mmpk or can I put the tpk in a directory within my app and point the Basemap to it? I've tried the former but I can't get the basemap to show. No errors are returned either.
You need to add the TPK to your map in ArcGIS Pro before creating the mobile package. So the output of the MMPK will include your TPK and any other layers in the map.
It is best to ensure that the projection of the map matches that of the TPK before packaging.
Nakul Manocha and I tried this workflow you mentioned where we have both MMPK and TPK in an offline map.
Mervyn Lotter is correct where we need to make sure to use the spatial reference for both MMPK and TPK
This is the TPK (https://www.arcgis.com/home/item.html?id=3f1bbf0ec70b409a975f5c91f363fe7d ) and MMPK (https://www.arcgis.com/home/item.html?id=3453c82cf36149faa3e609e0dcbc3b95 ) that we used. They are both in 4326.
We modified the "Open Mobile Map (mmpk)" sample in AppStudio Desktop, where we were able to hide the default basemap in the MMPK and append an external TPK as basemap baselayer to the map. This modification is done in samples/MMPK.qml
Erwin & Nakul.
Thank you for the reply. I was not able to get this to work (I made sure the spatial references were the same). However, I used your modification to hide or enable multiple basemaps that were included in my mmpk as a workaround.
Back to your example, instead of using the CopyLocalData function couldn't I just place the .tpk file in my directory structure and point the path to it?
Yes, you could just place the file in the folder where the app has access and read from it directly.
So you were not able to make this work using your own MMPK and TPK? Did my sample work? I included the TPK and MMPK that you can download from ArcGIS Online.