Select to view content in your preferred language

WMTS layer not working

1878
12
07-28-2023 05:50 AM
NathanAtkinson
Emerging Contributor

For some reason when I add a WMTS layer AGOL appends "rest" to the end of my base URL making it an invalid query. so https://geo.spatialhub.scot/geoserver/sh_cpth/gwc/service/wmts?authkey=xxxxxxxxxx becomes https://geo.spatialhub.scot/geoserver/sh_cpth/gwc/service/wmts/rest?authkey=xxxxxxxxxx

NathanAtkinson_0-1690548564288.png

 

12 Replies
NathanAtkinson
Emerging Contributor

Though when it does a GetCapabilites request to list the layers at that endpoint it does not append "rest" to the end of the query...

NathanAtkinson_1-1690549048601.png

 

 

0 Kudos
MiguelParedes
Esri Contributor

Greetings @NathanAtkinson 

When adding the WMTS to say, Map Viewer in ArcGIS Online, have you tried entering the Authkey as a custom parameter instead of appending it to the end of the URL?
kER350HkPN.jpg

Give that a go and see if it works for you.

Miguel
0 Kudos
NathanAtkinson
Emerging Contributor

Hi Miguel,

Yes, I have already added the authkey as a custom parameter. The issue is that AGOL is appending "rest" to the end of my URL as seen above in the screenshots provided when AGOL makes a GetCapabilites request to fetch the layers "rest" is not appended to the URL and I get a status code of 200. But when I added the layer all following requests have "rest" appended to the URL making it an invalid endpoint.

 

MiguelParedes
Esri Contributor

Greetings @NathanAtkinson 

That is quite odd behaviour. Is this happening regardless of whether you use the Map Viewer AND Map Viewer Classic?

Have you tried adding the WMTS as an item in Content?

I would be very interested in testing the WMTS. If you are an Esri UK customer, I would recommend raising a support case with Technical Support so that we are better able to assist you.

Miguel
IS_SpatialHub
Emerging Contributor

Thanks Miguel, yep, we have an open Tech Support query about this. We're also having issues filtering our WFS services (by attribute) when bringing them into ArcGIS online. Don't suppose you have any advice on how/ if that can be done?

0 Kudos
MiguelParedes
Esri Contributor

Greetings @NathanAtkinson 

If you add the WFS to the Map Viewer, you should be able to use the Filter tool.  Here is an illustration:

MiguelParedes_0-1694678028274.png

Have you tried the above?

Miguel
0 Kudos
IS_SpatialHub
Emerging Contributor

Yep, it fails (Times Out) at the load stage using a CGL_FILTER parameter. Interestingly, Map Viewer Classic seems to totally ignore such WFS filter parameters.

0 Kudos
MiguelParedes
Esri Contributor

Greetings @NathanAtkinson 

For the WFS, in the Map Viewer, are you using the correct syntax for the CQL_FILTER?
Here is an example that works for me:
0X6Y4icKeW.jpg

If this is an Esri WFS, I'm afraid that, as far as I know, these do not support CQL_FILTER.

Miguel
0 Kudos
IS_SpatialHub
Emerging Contributor

Don't worry, we've got the WFS filter working now (but only in the new AGOL map - it doesn't work in 'Classic'). Our main issue is why our WMTS isn't able to work in AGOL. This is the open URL (with open auth key) we're trying to get working: https://geo.spatialhub.scot/geoserver/sh_mwgt/gwc/service/wmts?authkey=b85aa063-d598-4582-8e45-e7e60...

Give us a shout if you have any ideas.

0 Kudos