Select to view content in your preferred language

Using a Pre-Downloaded Offline Map

291
4
05-31-2024 01:55 PM
Labels (1)
Paige
by
New Contributor II

I want to download a map for offline use, save the map files in my code, and then display that map if no Internet connection is established on application startup. Is this possible, or is it only possible to use an offline map that you have already saved earlier in the same session? If it is possible, how would I do this?

0 Kudos
4 Replies
TroyFoster
Occasional Contributor

Yes, check the samples for the generate offline map example

https://github.com/Esri/arcgis-maps-sdk-samples-qt/tree/main/ArcGISRuntimeSDKQt_CppSamples/Maps/Gene...

 

If you have a small simple shapefile or a mobile geodatabase for the area that your map will be used you can definitely load that in first on startup, then if the online map display call fails you cna keep it displayed.

https://github.com/Esri/arcgis-maps-sdk-samples-qt/blob/main/ArcGISRuntimeSDKQt_CppSamples/DisplayIn...

Paige
by
New Contributor II

Thanks for your response. I already found the tutorial to generate an offline map, but that isn't what I need. It looks like that only works if you have an Internet connection upon application startup, then lose it later. I am looking for a solution that works if you never have an Internet connection.

Interesting idea about the shapefile; I'm not familiar with those. Is there a way I can create one from an offline map that I have saved in ArcGIS online?

0 Kudos
GuillaumeBelz
Esri Contributor

Hi,


if you have an Internet connection upon application startup, then lose it later

This sample shows how to generate an offline map, this step requires to be online to get the data. But when you have an offline map (the mmpk file in sample), you can use it offline.

Here's a sample to open a mmpk file: https://developers.arcgis.com/qt/cpp/sample-code/open-mobile-map-map-package/

All details about offline maps (and others offline solutions): https://developers.arcgis.com/qt/offline-maps-scenes-and-data/

Guillaume

0 Kudos
Paige
by
New Contributor II

Thanks for your response, Guillaume. I've spent the last month trying to get a trial of ArcGIS Pro so that I can create mobile map packages, but customer service has told me that I can't do that while I have an active ArcGIS developer license. Is there a way that I can create mobile map packages without ArcGIS Pro? It seems like there should be a way, right?

0 Kudos