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

doc(WMTSSource): Change the link and the extend to TMSSource #2079

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

a-dutremble
Copy link
Contributor

Description

It is not possible to specify the TileMatrix identifier. In WMTSSource, the identifier corresponds to the zoom level (%TILEMATRIX). The changes in this PR make it possible to specify a different identifier using a callback function.

Motivation and Context

Using other specific sources can be useful. For example, using a WMTS flow from a GeoServer. This allows people who know how to use GetCapabilities to specify a different identifier. This is only a temporary solution. The goal is to automatically implement the retrieval of this information in the GetCapabilities as mentioned in #285.

@@ -87,7 +89,8 @@ class WMTSSource extends TMSSource {
'&REQUEST=GetTile' +
`&STYLE=${source.style || 'normal'}` +
`&TILEMATRIXSET=${source.tileMatrixSet}` +
'&TILEMATRIX=%TILEMATRIX&TILEROW=%ROW&TILECOL=%COL';
`&TILEMATRIX=${source.tileMatrix('%TILEMATRIX')}` +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you use a function to set tile matrix identifier?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to WMTS standard, the TileMatrix parameter is not always the zoom level. For exemple, for GeoServer, it is the crs concatenate with the zoom level (ex: EPSG:4326:14)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but the callback doesn't fix it because it calls only one time, when the source is instanced.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, when i wanted to do. It was possible in TMSSource. I updated the doc, so that WMTSSource extends TMSSource and not Source.

@a-dutremble a-dutremble changed the title feature(WMTSSource): Add callback to specify TileMatrix doc(WMTSSource): Change the link and the extend to TMSSource Apr 18, 2023
@a-dutremble a-dutremble marked this pull request as ready for review April 18, 2023 10:05
@mgermerie mgermerie merged commit 23c16d2 into iTowns:master Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants