Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Apr 2, 2021 4:20:45 AM
Apr 21, 2017 4:55:05 AM
QGA can consume geodata from many different sources including Esri ArcGIS online, here's what's needed to show the data as a feature layer in QGA.
Start by figuring out the correct parameters. In this case the source is administrative boundaries (Buurt) of the Dutch city Zwolle.
Authentication in ArcGIS
Special note regarding Authentication in ArcGIS (Thanks to ssamuels for the solution)
The authentication when working with secured map services from ESRI can be solved by setting up a REST connection in the loadscript to retrieve a new access token from the REST API of ArcGIS Online. This is done by sending a GenerateToken request to the URL "https://www.arcgis.com/sharing/generateToken?parameters". The REST call must be a POST request over https and takes the following parameters:
username - Username of the user who wishes to get a token.
password - Password of user who wishes to get a token.
referer - The base URL of the web application that will invoke the services
expiration - The token expiration time in minutes (default value for this parameter is 60 minutes)
f - The response format. The value for this parameter must be "json".
The resulting access token is stored in the data model and can be used as a text variable to append to the location service url in the GeoAnalytics extension.
Hi Patrick,
I wanted to share this information with you and other community members, because it might be of value.
I managed to solve the authentication issue when working with secured map services from ESRI, by setting up a REST connection in the loadscript to retrieve a new access token from the REST API of ArcGIS Online. This is done by sending a GenerateToken request to the URL "https://www.arcgis.com/sharing/generateToken?parameters". The REST call must be a POST request over https and takes the following parameters:
username - Username of the user who wishes to get a token.
password - Password of user who wishes to get a token.
referer - The base URL of the web application that will invoke the services
expiration - The token expiration time in minutes (default value for this parameter is 60 minutes)
f - The response format. The value for this parameter must be "json".
The resulting access token is stored in the data model and can be used as a text variable to append to the location service url in the GeoAnalytics extension.
Excellent, thanks a lot! I will add that to the article.
Hi Samuels,
Can you please share the screenshots of your work?
I am also having trouble in fetching the data directly from ARCGIS (may be because of authentication) but when I fetch the same exported geojson file from another source (dropbox), it's working fine.
Error while fetching directly from ARCGIS is also attached :
Hi Jahanzaib,
I did not use the GeoAnalytics Connector to extract data from ArcGIS. I followed the instruction provided by Patric Nordström at the top of this post to call the location service URL directly in the extension. The URL points to a secured feature layer in ArcGIS Online, therefore you need to include an access token in the URL as parameter. I only used the script in my app to set up a connection to the ArcGIG REST API with the Qlik REST Connector, to retrieve a new temporary access token .
Samuels,
Can you please share the screenshots of the REST API connector with parameters?
Thanks
Here you go!
Thanks alot
Hi Jahanzaib, fyi, looking at the response, it doesn't look like your Arcgis server responded properly,
"Connection timed out"
Hi Patric,
Thanks for your reply, Do you have any idea why ArcGIS server is not responding properly? Not even in client's own premises !
Jahanzaib,
Is your ArcGIS server public available or is it an internal resource?
To access local resources you need Qlik GeoAnalytics Plus or Enterprise.
Thanks,
Patric