I'm getting '#load() Failed to load layer TypeError: Cannot read property 'indexOf' of undefined' error when I tried to load WMSLayer in my application.
I've tried several different WMS service URLs but with no positive results. The code from the official sample doesn't work either.
A similar question has been asked and someone suggested that using proxy might solve the issue, but implementing proxy seems to be a quite complicated process. Please note that the URL in the question has http instead of https like in my application, the error is different from what I'm getting as well.
Does anyone figure out what I'm doing wrong or anything I missed out?
Here's my code :
I created a codepen from the code you provided above, but removed the other layers (because I did not have their information): https://codepen.io/annefitz/pen/ZEYppzq The WMSLayer seems to load fine in this sample. Is the error coming from one of your other layers?