I have a problem with a specific WMTS provider when trying to upgrade from v10 to v14. I am currently at the latest production release. This provider, Planet, requires us to provide an api key and some other data (date range, color visualization) with each image request. In our version 10 application we are overriding OnSendingWebRequest and modifying the RequestUri to add these things. It works perfectly.
On attempting to upgrade to the WmtsAsyncLayer I see that OnSendingWebRequest is gone and in its place is OnSendingHttpRequestMessage. The argument is a little different but buried inside I still find a RequestUri that I can modify as needed. I don’t think that is where our current problem lies.
What appears to be happening is that the RequestUri provided in the argument of OnSendingHttpRequestMessage is not the same as what is provided in the old OnSendingWebRequest. For example, when a request is made for an image in version 10, the AbsoluteUri looks like this:
This is prior to any modifications we make. But when the same request is made with version 14, it looks like this:
The server does not understand this request and we get the following error:
The HTTP request failed with status code: Not Found
The correct request format is found in the GetCapabilities document, but I don’t think it is being read the same way in version 14 as it was in version 10. With Planet Data you don’t use the base Uri for subsequent requests, only for GetCapabilities.
Maybe you can make some sense out of this without a sample project. The problem is that accessing the Planet data requires a proprietary api key which I cannot easily provide.
Thanks for any help!
Steve