Select to view content in your preferred language

WMTS Service works in ArcGIS Pro but not ArcGIS Javascript - uses direct XML file, not service

268
2
Jump to solution
02-20-2026 01:59 PM
mjperez-usgs
Emerging Contributor

I am trying to consume this site's WMTS service as described: https://rangelands.app/support/19-viewing-rap-data-in-your-gis

 

I can load it into ArcGIS Pro using their directions and URL, but I cannot get it to load in ArcGIS Javascript SDK, as it always seem to try to make a GetCapabilities request, which doesn't seem to exist on their server. In Pro I can see it's using the exact URL I gave it (the .xml file).

Is there a way to not have the 4.0 SDK (I'm on 4.34) not make this GetCapabilities request? I am not sure what Pro is doing differently.

 

For reference I am doing this: 

            const wmtsLayer = new WMTSLayer({
                url: wmts,
                title: "Rangeland Analysis Platform",
                id: "rangeland-analysis-platform",
                visible: true
            });
            map.add(wmtsLayer);
 
And I have ensured this URL is allowed per my server's connect-src policy.
0 Kudos
1 Solution

Accepted Solutions
YannCabon
Esri Contributor

Hi,

The server you are trying doesn't have CORS headers configured for JavaScript (and the Maps SDK) to correctly fetch the capabilities file.

image.png

View solution in original post

2 Replies
YannCabon
Esri Contributor

Hi,

The server you are trying doesn't have CORS headers configured for JavaScript (and the Maps SDK) to correctly fetch the capabilities file.

image.png

mjperez-usgs
Emerging Contributor

Thanks. I will contact the developers and see if I can get them to set it up.