Select to view content in your preferred language

DownloadButton control

537
5
Jump to solution
03-14-2019 10:10 AM
LaurynasGedminas2
Regular Contributor

In this example: Generate offline map—ArcGIS Runtime SDK for Qt | ArcGIS for Developers 

I don't have the import Esri.ArcGISExtras 1.1 module, and the

'DownloadButton' control gives me error, which module should I use?

Thank you,

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

You can find the source for the sample here - arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_QMLSamples/Maps/GenerateOfflineMap at master · Esri/arc... 

Try copying the GenerateWindow and DownloadButton into your project

View solution in original post

0 Kudos
5 Replies
LucasDanzinger
Esri Frequent Contributor

If you don't have Extras, you can comment out that import. You'll need to fix up 2 more lines - change the `property real scaleFactor` to be equal to 1, and for `property url outputMapPackage`, hardcode a path or use another module to set a local file URL such as - "file:///Users/username/data.mmpk"

0 Kudos
LaurynasGedminas2
Regular Contributor

Ye, I did all that, getting error on DownloadButton and GenerateWindow controls:

qml: GenerateWindow is not a type

Thank you,

0 Kudos
LucasDanzinger
Esri Frequent Contributor

You can find the source for the sample here - arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_QMLSamples/Maps/GenerateOfflineMap at master · Esri/arc... 

Try copying the GenerateWindow and DownloadButton into your project

0 Kudos
LaurynasGedminas2
Regular Contributor

Thank you Lucas, that resolves the controls problems.

How ever on start map doesn't show up, I checked the web map ID and its good

Anything else is missing?

0 Kudos
LaurynasGedminas2
Regular Contributor

ok, setting property 

loginRequired: false
resolved the loading issue.

Thanks,
0 Kudos