Qt C++ Widgets Samples

1938
13
Jump to solution
07-27-2022 01:13 AM
RitvikRanadive
New Contributor III

Hi,

Are there any Qt C++ Widgets samples for -

1. Generating offline map for preplanned area and storing it locally

2. Generating offline map on-demand and storing it locally

3. Loading a stored offline map

4. Get GPS coordinates from user inputs like mouse click 

 

Tags (3)
0 Kudos
13 Replies
LucasDanzinger
Esri Frequent Contributor

The sample itself deletes the mmpk on exit by use QTemporaryDir. If you modify it to output to a different non-temp location, it won't be deleted.

0 Kudos
RitvikRanadive
New Contributor III

Are you sure? As I have already tried providing a different path in the following line of code in GenerateOfflineMap.cpp of the example:

GenerateOfflineMapJob* generateJob = m_offlineMapTask->generateOfflineMap(params, "/home/mypath/" + "/offlinemap");

It generated the files at the specified path but there was no .mmpk file in this.
There was mobile_map.mmap file in this but this does not work with the OpenMobileMapPackage example.

0 Kudos
LucasDanzinger
Esri Frequent Contributor

The directory with the mmap and various other files is an "unpacked" mobile map package. The constructor to MobileMapPackage takes either the path to a file with .mmpk extension or to the directory of an unpacked mobile map package. https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-mobilemappackage.html#MobileMa... 

RitvikRanadive
New Contributor III

ah i see! thanks a lot for all your help! we can close this one now...

0 Kudos