Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER

Setting up a TMS as a background map in Qlik GeoAnalytics

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Patric_Nordstrom
Employee
Employee

Setting up a TMS as a background map in Qlik GeoAnalytics

Last Update:

Apr 2, 2021 4:15:50 AM

Updated By:

Patric_Nordstrom

Created date:

May 12, 2017 2:45:59 AM

Attachments

QGA can consume geodata from many different sources, here's what's needed to use a TMS a background map in QGA.

Sense Map chart

Start with specifying the source. In this case the source is a TMS from ArcGIS Online: World_Topo_Map.

  1. The TMS service is specified as a url with parameters for X, Y as Z, which specifies the position of the map image and the scale level. At ArcGIS Online the start tile is defined as: https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/tile/0/0/0 with z, y...‌ as the order of the last parameters.
  2. Exchange the last part of the parameters and format as a string, this is the Tile Service URL:

    ='http://server.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/tile/${z}/${y}/${x}'


  3. Create a map and add a Background layer
  4. For the Background layer specify the URL.
  5. Don't forget to include the copyright text in the attribution:

    Sources: Esri, HERE, DeLorme, Intermap, increment P Corp., GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), swisstopo, MapmyIndia, © OpenStreetMap contributors, and the GIS User Community

Old QGA Map extensions

Start with specifying the source. In this case the source is a TMS from ArcGIS Online: World_Topo_Map.

  1. The TMS service is specified as a url with parameters for X, Y as Z, which specifies the position of the map image and the scale level. At ArcGIS Online the start tile is defined as: https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/tile/0/0/0 with z, y...‌ as the order of the last parameters.
  2. Exchange the last part of the parameters and format as a string, this is the Tile Service URL:

    ='http://server.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}'

  3. Create a map view and a geodata layer
  4. For the geodata layer specify the Tile Service URL and Source format: TMS and Tile Size: 256.
  5. Don't forget to include the copyright text some where in the app, in this case the attribution should be:

    Sources: Esri, HERE, DeLorme, Intermap, increment P Corp., GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), swisstopo, MapmyIndia, © OpenStreetMap contributors, and the GIS User Community

 

See also the two attachments, example apps for Qlik Sense and QlikView.¨

 

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.

Tags (3)
Comments
wallacechen
Creator
Creator

Hi Hassam,

if the map service has wmts format , you can try to put  /tile/{z}/{y}/{x}   into the url.

then it should be able to loaded the map from arcgis via geoanalytics to qlikview.


cheers,


Wallace

Anonymous
Not applicable

Hi Wallace,

Thanks for your response, "tile/{z}/{y}/{x}" is working in the above mentioned service by Hassam but it is not working on our client's provided ArcGIS service.

Any suggestion from your side?

Kind Regards,

Jahanzaib

0 Likes
wallacechen
Creator
Creator

Hi Jahanzaib,

can you please check if the ArcGis Map Service provided by your client get web map tile service(wmts). You should be able to check it on top left hand side on the arcgis map service webpage. Without this , logically I dont think you will be able to use  tms in geoanalytics to consume the arcgis map service for tiled map service.

Thanks ,

Wallace

Anonymous
Not applicable

Wallace,

Thanks a lot for your prompt response. Can you please share a screenshot that where to check the service format?

Thanks,

Jahanzaib

0 Likes
wallacechen
Creator
Creator

something like as follows :  it should be JSON|SOAP|WMTS

but this example doesnt have WMTS. so it will not be able to be consumed via TMS.


arcgis.PNG

Anonymous
Not applicable

Thanks a lot for your help. Will share this with our client's GIS team.


Regards,

Jahanzaib

0 Likes
Anonymous
Not applicable

Dear Wallace,

Please check the attachments :

1- Single hard-coded tile successfully fetched (Single Tile Image Attached)

2- Unable to fetch dynamic tiles (Dynamic Tile Image Attached)\

3- ArcGIS Service we are using is WMTS (WMTS Image Attached)

Any suggestion?

Regards,

Jahanzaib

Single Tile.png

Dynamic Tiling.png

WMTS.PNG

0 Likes
wallacechen
Creator
Creator

Hi ,

not sure if the issue is resolved ? some high-level suggestions, but not guaranteed :

1: If  the map service is on premise server , pls ensure you are in the environment for fetching the map.

2:  try different version of wmts

3: try to put it in arcgis rest service

0 Likes
Patric_Nordstrom
Employee
Employee

Hi,

QGA don’t support WMTS, only WMS and TMS, but it might work anyway if the service is symmetrical as a TMS, ie

  • Same origin for all tile levels.
  • Same scale factor between all tile levels.
  • Same tile size for all tile levels.

I don’t see all properties for the service, but what I can see is that the tile size is 512, not 256 as specified.

I would ask for the url if possible and/or all of the meta data for the service.

Thanks,

Patric

0 Likes
alexhausmann
Partner - Contributor II
Partner - Contributor II

Hi Patric

We want to use a secured WMS Service as background Map.

The security toke we get is only valid for 5 minutes and only generated when we reload the App.

How do we solve this challange?

 

Thanks

Alex

0 Likes
Version history
Last update:
‎2021-04-02 04:15 AM
Updated by: