Select to view content in your preferred language

WMS Layer - invalid GetCapabilities response

529
1
08-29-2022 10:46 PM
RobertSandu
New Contributor

Hi,

We are trying to add a WMS layer in ArcGIS but somehow, for one of our providers, the GetCapabilities response seems to be invalid because ArcGIS is not fetching data from it after the GetCapabilities request.

We've tested the code with three other WMS providers and the data loads fine, just the one from 

 
seems to return invalid data.
 
I've created a code pen here https://codepen.io/rsandu/pen/oNqRvqo
and also a code pen that tests that the code works as expected with another provider in here https://codepen.io/rsandu/pen/LYdwyRV
 
Thank you
0 Kudos
1 Reply
AnneFitz
Esri Regular Contributor

Hi @RobertSandu - you need to set the spatialReference on your layer and the MapView (not the map). https://codepen.io/annefitz/pen/MWVNBmw

Now the layer is fetching data after the GetCapabilities request, but I still get a white screen. Is this expected? The GetMap requests return white for me, for example: https://api.emapsite.com/dataservicenoauth.svc/api/wms/xais?width=1228&height=395&bbox=-29464551.406...

 

0 Kudos