wmsLayer 'onlineResource' Url problem when using proxy

208
0
01-11-2024 07:02 AM
Ch_Schmid
New Contributor

I'm developing a webapp with vue and ArcGIS API for JavaScript 4.16 and have the following problem:

I create a wmsLayer with a resource that I call via a proxy (definition in Vue). This forwarding works so far and the Getcapabilities.xml is queried.
Correct Url:
http://localhost:8080/mapserver/?SERVICE=WMS&REQUEST=GetCapabilities&map=fledermaus_flugkorridore_vd...

Server Url that ist fowarded:
https://mapserver.test.ch/cgi-bin/mapserv

However, I get an unspecific error in the map and the layer is not overlaid..
[esri.layers.WMSLayer] #load() Failed to load layer (title: 'Layer', id: 'ch.wsl.vdc.oei_Quartiere') TypeError: r is null

However, I have noticed that the OnlineResource is inserted incorrectly in Getcapabilities.xml, which presumably means that the layer cannot be loaded.


<GetCapabilities>
...
<Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:8080:8080/cgi-bin/mapserv?map=fledermaus_flugkorridore_vdc&amp;"/></Get>
...
</GetCapabilities>

The class 'wmsLayer' is a blackbox for me. Someone any ideas..?
Thanks Christian

0 Kudos
0 Replies