Hi!
I would like to get information about the service urls privided at my onw portal.
So like to start with Esri::ArcGISRuntime::Portal, but how?
Thx in advance!
Norbert
Hi Norbert,
This documentation discusses how you sign into your Portal - Access the ArcGIS platform—ArcGIS Runtime SDK for Qt | ArcGIS for Developers
To access items, see this topic - Access portal content—ArcGIS Runtime SDK for Qt | ArcGIS for Developers
And to search, see this topic - Search for content—ArcGIS Runtime SDK for Qt | ArcGIS for Developers
The high level workflow is:
- Create Portal object using your URL, and pass in credentials with username and password
- Load the Portal and wait fo it to be done loading
- Call findItems on the Portal object by passing in query parameters
- Get your desired Portal Item from this list
Hi Luke!
Thanks for your quick answer 🙂
I tried my own URL "http://XXX.de" with credentials
After load i get doneLoading and errorOccured with:
Esri::ArcGISRuntime::Error: code=404, domain=0, extendedErrorType=0, message='Error transferring http://excgeo20.sl.defence-elec.de/sharing/rest/info?f=json - server replied: Not Found', additionalMessage='Error transferring http://excgeo20.sl.defence-elec.de/sharing/rest/info?f=json - server replied: Not Found'
Any ideas?
Norbert- are you on the same internal network? If not, is your portal accessible outside your network? Also, did you set up your proxy? It should be as simple as the code in the doc:
QUrl portalUrl = QUrl("http://geoportal.mycompany.com");
Credential* portal_Credential = new Credential(portalUsername, portalPassword, this);
Portal* onPremisesPortal = new Portal(portalUrl, portal_Credential, this);
connect(onPremisesPortal, &Portal::loadStatusChanged, [this, onPremisesPortal](LoadStatus loadStatus)
{
if (loadStatus == LoadStatus::Loaded)
{
PortalInfo* info = onPremisesPortal->portalInfo();
qDebug() << info->portalName();
}
});
onPremisesPortal->load();
Hi Luke!
I use my own map example to load an arcgisonline basemap tu guarantee that internet access is working.
In the same example i configure this portal url without credentials:
new Esri::ArcGISRuntime::Portal(QStringLiteral("http://www.argis.com"));
or
new Esri::ArcGISRuntime::Portal(QStringLiteral("http://www.argis.com"), false);
After a few seconds:
2018-10-10 11:39:27.096 ERROR Portal |#| void SituationMap::Portal::onPortalDoneLoading(const Esri::ArcGISRuntime::Error &) Portal -> EsriError occured: Esri::ArcGISRuntime::Error: code=404, domain=0, extendedErrorType=0, message='Error transferring https://www.argis.com/sharing/rest/portals/self?f=json - server replied: Not Found', additionalMessage='Error transferring https://www.argis.com/sharing/rest/portals/self?f=json - server replied: Not Found' (SituationMap/Portal/portal.cpp:141)
2018-10-10 11:39:27.096 ERROR Portal |#| void SituationMap::Portal::onPortalErrorOccurred(const Esri::ArcGISRuntime::Error &) Portal -> EsriError occured: Esri::ArcGISRuntime::Error: code=404, domain=0, extendedErrorType=0, message='Error transferring https://www.argis.com/sharing/rest/portals/self?f=json - server replied: Not Found', additionalMessage='Error transferring https://www.argis.com/sharing/rest/portals/self?f=json - server replied: Not Found' (SituationMap/Portal/portal.cpp:132)
Is this maybe also not implemented on linux?
If it fails to load with http://arcgis.com, I think that suggests some sort of network issue. It works in general on Linux - we run full certification testing on all the supported platforms.
I got it:
I was using an url like this: http:/XXX.de
Correct is: http://XXX.de/arcgis
Consulting explained that the webadapter of our own portal uses "arcgis" by default.
So he suggested to add "/arcgis"
This fact should be noticed in the doc right!?
Thx
So, using http://XXX.de/arcgis i can connect to the portal anonymously.
After load and fetchBasemaps(), fetchFeaturedGroups(), fetchFeaturedItems(), fetchHomepageFeaturedContent() i can get the according model.
But the model content is not as expected:
Maybe i have to use login credentials?
Therefore i updated the ssl certificates.
Result:
errorCode 25, related to SSL...
What is my long term goal?
Any hints?
We have a sample for that. It uses Qt Quick, so the UI portions won't be relevant for you, but the Portal related code should be - arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_CppSamples/CloudAndPortal/ShowOrgBasemaps at master · E...
You can see that once the Portal loads, we call fetchBasemaps - arcgis-runtime-samples-qt/ShowOrgBasemaps.cpp at master · Esri/arcgis-runtime-samples-qt · GitHub
Once basemapsChanged emits, you can access the BasemapListModel and display that in a view of some sort (like List or GridView) Portal Class | ArcGIS for Developers
The list model has roles for the thumbnail URL, name, etc - BasemapListModel Class | ArcGIS for Developers
Hi Luke!
Thank you for your answer.
As describes i need not just the basemapListModel.
More important are the (basic) services listed under "My Content" if i login as portal user (admin).
There are my services of type
Is it correct that this service list can´t be retrieved using the SDK?
Is there another?
Thx