Skip to content
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

WMTS Imagery Prodiver drops query parameters with subdomains #9598

Closed
ebogo1 opened this issue Jun 7, 2021 · 2 comments
Closed

WMTS Imagery Prodiver drops query parameters with subdomains #9598

ebogo1 opened this issue Jun 7, 2021 · 2 comments
Labels

Comments

@ebogo1
Copy link
Contributor

ebogo1 commented Jun 7, 2021

This was found on this forum thread. I believe this is happening because of the behavior in the requestImage function of WebMapTileServiceImageryProvider.js. If the WMTS imagery provider's _useKvp is false, the templateValues object does not look like it includes the relevant parameters. In my testing it looks like this flag is set to false with subdomains but true without them.

Sandcastle example: link

  • query URL with parameters (no subdomains): https://maptest.ixstack.net/default_config/service?tilematrix=3&layer=default_layer&style=default&tilerow=3&tilecol=3&tilematrixset=default_grid&format=image%2Fpng&service=WMTS&version=1.0.0&request=GetTile
  • query URL without parameters (with subdomains): https://maptest2.ixstack.net/default_config/service
@lilleyse
Copy link
Contributor

lilleyse commented Jun 8, 2021

In my testing it looks like this flag is set to false with subdomains but true without them.

Can you tell if this is intentional or an oversight? Also, if the fix is simple enough this could be marked as good first issue.

@ebogo1
Copy link
Contributor Author

ebogo1 commented Jun 8, 2021

I asked @tfili about this; it looks like setting the flag was intentional but the check for the { character was too general to track the case where just the {s} keyword is provided.

I looked over the WMTS spec, and it doesn't look like there's an official way to specify a subdomain with KVP -
image

The easiest solution here is probably -

  1. In the constructor: if there is a { character found because of the {s} keyword, and there are no other keywords, it is safe to use KVP; else continue using templates like we are now.
  2. In requestImage(), the behavior for when useKvp is false can stay the same, but if it is true, it should replace the {s} keyword in the request URL. This is because the first change makes it so that useKvp can be true even when a subdomain is provided.

@ebogo1 ebogo1 added the good first issue An opportunity for first time contributors label Jun 8, 2021
srothst1 added a commit that referenced this issue Jun 9, 2021
@ebogo1 ebogo1 closed this as completed Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants