Closed Zalitoar closed 1 year ago
To fix it, the code that was using jQuery has been entirely replaced with pure JavaScript. Requests (fetch) will now be made to the service's host, and the resulting XML will be parsed using DOMParser. Additionally, code has been added to identify and handle errors in the service's responses, providing information about the specific layer of the service where the error occurred.
Problem detected: Layers can't be added to menu as the capabilities XML parsing fails. XML is treated as text, and at some point it is encoded changing the expected XML syntax in other characters not supported by the actual basic text search for layers parameters.
Possible solution: Refactor WMS parsing function using DOMParser to handle the XML response instead converting it to text. This would avoid the automatic 'URI encoding' of text.