Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE

Setting up a WMS 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 WMS as a background map in Qlik GeoAnalytics

Last Update:

Aug 1, 2022 6:23:05 AM

Updated By:

Patric_Nordstrom

Created date:

Apr 21, 2017 5:58:02 AM

Sense Map chart

Example adding a WMS background

1. Add in Content Security Policy (Qlik SaaS)
Origin: nowcoast.noaa.gov Directive : connect-src and img-src
2. Add Map chart
3. Add background layer WMS
url: https://nowcoast.noaa.gov/arcgis/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/WMSServ...
version:1.3.0
crs: EPSG:3857, transparent, png, layer: Image


Note, use CRS 3857 if the base map has the Mercator projection (default).
Pick CRS 4326 if the base map has the Adaptive projection.

Link to documentation and example.

 

(QGA Extension map, old kept for reference)

Start by figure out the correct parameters. In this case the source is a WMS with data from the Dutch city Zaanstad.

Note, the urls below has chnaged and not working anymore, principles still applies)

  1. Easiest way to pick up the WMS source and at the same time verify that it works is through a demo page,
    for example http://geo.zaanstad.nl/mapproxy/demo/?srs=EPSG%3A28992&format=image%2Fpng&wms_layer=Zaanstad
  2. Select CRS (coordinate system), 4326 for use together with the default adaptive basemap or 3857 with the defualt basemap. Right click on the map image and "Open image in new tab..." . Copy the image url:
    http://geo.zaanstad.nl/mapproxy/service?LAYERS=Zaanstad&FORMAT=image%2Fpng&SRS=EPSG%3A28992&EXCEPTIO...
  3. Remove the following parameters (these are filled in by the map) : BBOX, WIDTH, HEIGHT, VERSION, SRS.
    That produces the url to use: http://geo.zaanstad.nl/mapproxy/service?LAYERS=Zaanstad&FORMAT=image%2Fpng&EXCEPTIONS=application%2F...
  4. Fill in CRS and VERSION (in my example EPSG:3857 and 1.1.1 check the WMS url for the version).

    Pro tip, "Load via Server" is practical to use if the the WMS doesn't allow CORS.

    Pro tip 2, run Sense in the browser (http://localhost:4848/hub/my/work) and use the dev console (F12), good to spot errors from the WMS server.

 

Tags (1)
Labels (2)
Comments
Patric_Nordstrom
Employee
Employee

Any third party map server are connected using the geodata or the backgound layer using either TMS or WMS.

To setup a 3rd party TMS as default, check this post:

https://community.qlik.com/t5/Qlik-GeoAnalytics-Documents/Native-mapchart-settings/ta-p/1563181

 

Thanks,

Patric

0 Likes
Matsa
Creator
Creator

Hello @Patric_Nordstrom ,

thank you for the explanation , I created this link :

https://geo.zaanstad.nl/mapproxy/service?LAYERS=Begraafplaatsen&FORMAT=image%2Fpng&SRS=EPSG%3A4326&E...

and I put it as server URL for data layer, but I could not see it .

did I something wrong?

Thank you in advance.

Regards

0 Likes
Patric_Nordstrom
Employee
Employee

The mapchart has a WMS wizard, that's the easiest way to add a WMS. 

The start URL is ok, but it needs to be pruned, pls follow the steps 1-4 above ^^

='https://geo.zaanstad.nl/mapproxy/service?service=WMS&transparent=true&request=GetMap&layers=Begraafp...'

Thanks,

Patric

Matsa
Creator
Creator

hello @Patric_Nordstrom  , I removed the extra  parameters  :

https://geo.zaanstad.nl/mapproxy/service?LAYERS=Begraafplaatsen&FORMAT=image%2Fpng&EXCEPTIONS=applic...=

in properties ( Geodata layer)I changed EPSG to 4326

I put version 1.1.1( which was in linke before)

But still I could not see the map.

I have to notice that I am using qlikview 11.

Do you have any Idea about problem?

Thanks ,

Matsa

 

 

0 Likes
Matsa
Creator
Creator

Hi @Patric_Nordstrom , 

Finally thanks to your note, we successful to use WMS( not with the link you mentioned )

Now we have another question,about base map when we are using WMS.

Generally we have 3 different types of empty as base map:

1)empty (WGS-84)

2)empty(undefined meters)

3)empty (Mercator)

we thought we have to use 3(empty(mercator)) with CRS--> EPSG:3857 , but it does not work always and we need to change base map to 2.but even with 2 it does not work always.In fact we could not understand the reason of this behaviour( it works sometimes and it does not work other time)

I appreciate your help on this matter.

Regards,

Matisa

 

 

0 Likes
Patric_Nordstrom
Employee
Employee

All layers needs to have the same CRS (also the CRS of the WMS), the layers are not reprojected in the client.

Empty WGS-84: EPSG:4326 unprojected

Empty (undefined meters)  any meter based CRS

Empty(Mercator): EPSG 3587

Default: EPSG 3587

Adaptive: EPSG 3587

https://help.qlik.com/en-US/geoanalytics/Subsystems/GeoPropertiesQV/Content/qlikview/qlikview-imap_r...

Matsa
Creator
Creator

Thanks @Patric_Nordstrom  for the explanation . 

We recognized , we could not see some layers because they are behind of our background( we put one background map with TMS)

We solve our problem in this way:

  • We deselected ‘Draw order Auto’
  • We put ‘-10’ as ‘Draw order Adjustment’

Regards,

Matsa

Steven_Haught
Creator III
Creator III

@Patric_Nordstrom 

I am trying to add the following wms link to my geodata layer:

https://nowcoast.noaa.gov/arcgis/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/WMSServ...

I am not getting the layer on the map. I have set the version to 1.1.1 and CRS to EPSG: 3857 as I am using the default map base. 

Do I have something else wrong? The WMS link creates the layer in the regular Qlik map so, so it should be working?

0 Likes
Matsa
Creator
Creator

 @Steven_Haught ,

Have you tried with 'Empty(Mercator)' instead of Default Map?

Would you please share the error message which you see on top left of the map?

Regards,

Matsa

Steven_Haught
Creator III
Creator III

@Matsa 

 

The 'Empty(Mercator)' populates nothing at all. 

The error message states, "Geodata Layer: Failed to Load WMS image"

 

Contributors
Version history
Last update:
‎2022-08-01 09:23 AM
Updated by: