-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print tool does not print WMS layers that requires credentials #1442
Comments
The following code works:
|
For some reason the `crossOrigin` property is not exposed on `ImageWMS`... It feels wrong but i cannot find another way than checking the value of the private `crossOrigin_` property. Tested the generic get:er (`source.get("crossOrigin")`) and it returns `undefined` as well.
Please test it out now. For some reason the |
Yes, it feels like a bug in OL. It seems to be working with TileWMS source but not with ImageWMS. |
Yes, in my testing I got a layer that had a value in the source.crossOrigin property. |
Fixed |
Describe the bug
If you have a WMS layer that require credentials it will display correctly in the map. If you later want to print that map you will get a 401 error and the WMS layer is not included in the print.
Solution
In my investigation of the error I found that the problem seems to lie in the function
exchangeLayer
in the PrintModel.js file.The code looks like this:
However, if you check the values of the
source
object you will find thatsource.crossOrigin
is undefined.The text was updated successfully, but these errors were encountered: