Export Tiles from built-in basemap in ArcGIS Runtime

2232
27
Jump to solution
09-19-2017 10:10 AM
NicholasLiccini
New Contributor II

Hi!

I would like to save a predefined area of interest of a MapView that can be loaded when there is no network connection. I tried following the ArcGIS Samples for "ExportTiles" but it keeps failing. I am not sure what the correct solution would be, but perhaps someone could provide the steps I should follow to export the map tiles.

Thank you!

Nick

0 Kudos
27 Replies
LukeSmallwood
Esri Contributor

Hi Nicholas, yes ideally the view would work and allow you to provide the credentials. Can you (temporarily) create a Credential object with your user name and password and pass that to in the constructor of the Portal?

0 Kudos
NicholasLiccini
New Contributor II

Yes I've tried that (below). However, the portal now does not give an error, but it does not indicate that it loaded and the basemap made from the tiledLayer does not load either

Could it be the server I am trying to access? I'm entering my username and password as QStrings and don't enter any token like some error messages indicated I needed.

Credential* creds = new Credential(username, password, this);
Portal* portal = new Portal(QUrl("https://arcgis.com"), creds, this);
connect(portal, &Portal::doneLoading, this, [this](Error error){
    if (!error.isEmpty()){
      qDebug() << error.message() << error.additionalMessage();
    }else{
      qDebug() << "Portal loaded successfully";
    }
});
portal->load();
0 Kudos
LukeSmallwood
Esri Contributor

Hi Nicholas,

I've attached a zipped project with my code for the portal workaround which uses the AuthenticationView etc. Does that work for you?

0 Kudos
NicholasLiccini
New Contributor II

Yes that would be great! Where can I find the .zip file?

0 Kudos
LukeSmallwood
Esri Contributor

I attached it to my reply above - are you not able to access that?

0 Kudos
NicholasLiccini
New Contributor II

Hmm, it's not visible for me to download there

0 Kudos
LucasDanzinger
Esri Frequent Contributor

I can see the zip:

0 Kudos
NicholasLiccini
New Contributor II

Hmm, this is strange. All I see is the text from the post still:

0 Kudos