You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tile sources, like the Maanmittauslaitos WMTS api (page in Finnish only) in Finland, require API authentication to fetch tile data.
In my use case I was able pass the api key as part of the tile url as an url parameter. However it would be more robust to be able to add it as a header for the http requests.
I propose two mechanisms to support api authentication. These could be optional configuration in the printSpec.
ability to add query params as key/value pairs
custom headers that will be used for the tile requests
The text was updated successfully, but these errors were encountered:
I guess we could add an option for custom headers for each layer that relies on HTTP requests. For query params, including them in the provided url should be enough!
Just started looking into this but adding HTTP headers to WMS/WMTS layers for example might be trickier than I thought. We're relying on native img elements to load the tiles, and there's no way to specify custom headers with that method. This means we'd have to switch to loading the image data ourselves using fetch, which will be more work.
@jussih could you please confirm that this is needed, e.g. in the case of a tile service protected by Basic Auth? thanks!
Some tile sources, like the Maanmittauslaitos WMTS api (page in Finnish only) in Finland, require API authentication to fetch tile data.
In my use case I was able pass the api key as part of the tile url as an url parameter. However it would be more robust to be able to add it as a header for the http requests.
I propose two mechanisms to support api authentication. These could be optional configuration in the printSpec.
The text was updated successfully, but these errors were encountered: