Select to view content in your preferred language

Issue in loading maps from local location in Offline Routing sample code in arcgis qt 100.8

1269
3
Jump to solution
07-19-2021 10:47 AM
AbhijeetSatam
Occasional Contributor

Hi,

I am using QT 5.14.2 and Arcgis 100.8. I am trying to run the Offline Routing sample code. I downloaded the san_diego.zip folder from 

https://arcgisruntime.maps.arcgis.com/home/item.html?id=567e14f3420d40c5a206e5c0284cf8fc

unzipped and Placed it in 

C:\Users\Administrator\ArcGIS\Runtime\Data\tpk\san_diego

 The application is built successfully. However when I run it. The map does not load and neither do I get the warning msg:

qWarning() << "Please download required data.";

 Hence I am placing the map files at the correct location.

On running the application I get output as follows:

Capture.PNG

I have also tried another sample OpenMobileScenePackage wherein I placed the .mspk files in the same Runtime directory and this sample loads the map correctly.

Can anyone figure out what is the issue in loading the map files from the local location in the Offline routing sample. Is there any step I am missing ??

0 Kudos
1 Solution

Accepted Solutions
AbhijeetSatam
Occasional Contributor

Hi @Tanner_Yould ,

Thanks for the quick response. The issue is resolved. I tried changing the path to 

C:\Users\Administrator\ArcGIS\Runtime\Data\tpkx\san_diego

 But getting the same output as earlier. Map doesn't load and no error msg is displayed in qt console. 

But I noticed that the streetmap_SD was of the extension .tpkx and not .tpk. So changed the line 

const QString fileLocation = folderLocation + QString("/streetmap_SD.tpk");

to this:

const QString fileLocation = folderLocation + QString("/streetmap_SD.tpkx");

 And now the sample loads the map correctly.

View solution in original post

0 Kudos
3 Replies
Tanner_Yould
Esri Contributor

Hi @AbhijeetSatam, thanks for asking. It looks like you may be placing the unzipped files into the wrong directory. The sample looks for the files in `/ArcGIS/Runtime/Data/tpkx/`. Note the tpkx instead of tpk because this sample utilizes the Compact Cache V2 storage format tile packages which is recommended over the use of V1 .tpk tile packages. This storage format provides better performance to retrieve tiles when accessed over network file shares and cloud storage.

These tile package files are supported in ArcGIS Online, ArcGIS Desktop and ArcGIS Enterprise 10.7 or later, ArcGIS Pro 2.3 or later and applications built with ArcGIS Runtime SDK 100.5 or later for Android, Java, iOS, .NET, and Qt.

Please let me know if updating the directory resolves your issue, and thank you.

Tanner Yould
Product Engineer
ArcGIS Maps SDK for Native Apps
Esri
AbhijeetSatam
Occasional Contributor

Hi @Tanner_Yould ,

Thanks for the quick response. The issue is resolved. I tried changing the path to 

C:\Users\Administrator\ArcGIS\Runtime\Data\tpkx\san_diego

 But getting the same output as earlier. Map doesn't load and no error msg is displayed in qt console. 

But I noticed that the streetmap_SD was of the extension .tpkx and not .tpk. So changed the line 

const QString fileLocation = folderLocation + QString("/streetmap_SD.tpk");

to this:

const QString fileLocation = folderLocation + QString("/streetmap_SD.tpkx");

 And now the sample loads the map correctly.

0 Kudos
Tanner_Yould
Esri Contributor

I'm glad to see you were able to resolve this and thanks for pointing this out! We recently updated the files contained in that portal item zip folder to include a tpkx instead of a tpk but this of course causes backwards compatibility issues that I didn't foresee. Now that you've pointed this out, I can resolve this and ensure it doesn't happen to other users in the future. Thank you so much!

Tanner Yould
Product Engineer
ArcGIS Maps SDK for Native Apps
Esri