-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add support for MapTiler SDK #199
Open
petr-hajek
wants to merge
8
commits into
stamen:main
Choose a base branch
from
maptiler:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
15b4235
Add support for MapTiler SDK & update maplibre
petr-hajek c15023f
revert maplibre update
petr-hajek c13b961
update changelog
petr-hajek 47bdbb1
require full url for maptiler for now
petr-hajek 0eb5d2c
handle key in url for maptiler
petr-hajek 698a82a
Update README.md with mapState and viewMode config options
almccon 3d17616
Merge remote-tracking branch 'upstream/mapstate-config-docs'
petr-hajek d42e5bd
update text in Readme
petr-hajek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
## Unreleased | ||
|
||
- add support for MapTiler SDK | ||
|
||
## 0.16.0 | ||
|
||
- Add multi-level dropdowns | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm seeing Maptiler URLs fail in other renderers (Mapbox and Maplibre).
I think it's because here you're following the same pattern we use for a mapbox URL and as I think on this, I wonder if we need a change in this PR for Maptiler and a followup for Mapbox URLs.
Basically we haven't run into this with Mapbox URLs (with the mapbox protocol
mapbox://
) because we've considered them only valid via the Mapbox renderer despite us normalizing the URL here. This is because they typically also reference additional Mapbox protocol URLs for sprites and glyphs so we didn't consider this a bug (You'll see Mapbox styles using the protocol fail in Maplibre for example).Maptiler (correct me if I'm wrong) is different in that it does not use a custom protocol inside the style and instead creates a valid url with the key present when requesting the style url with that key:
So basically, we should be able to request the style with the new
maptilerApiKey
param while rendering with Maplibre, but we fail here because it looks at the URL (without accounting for the API key) before the style requested from the normalized the URL.tl;dr
style
overurl
(I don't think there's a side effect of this?) like this:Let me know if this does not sound accurate!