Repository navigation
docs: update the MapLibre GL JS examples to 6.16 - #3671
Merged
Merged
Conversation
Member
|
Hi @birkskyum Thanks heaps for taking the time to look at this! Is there anychance you could add the integrity checksum back in. A quick AI fix suggested this method, which works in chrome/firefox <script type="importmap">
{
"imports": {
"maplibre-gl": "https://unpkg.com/maplibre-gl@6.16.0/dist/maplibre-gl.mjs"
},
"integrity": {
"https://unpkg.com/maplibre-gl@6.16.0/dist/maplibre-gl.mjs": "sha384-uLwQnFL74rrONqIWx/ubL4wcAtA2h08tbMDZd9U4KbQ7GhaA7S1XKepHU89UkU7C"
}
}
</script>
<script type="module">
import * as maplibregl from 'maplibre-gl';
// ...
</script> |
Contributor
Author
|
@blacha I have added the integrity check |
blacha
reviewed
Oct 28, 2026
blacha
left a comment
Member
There was a problem hiding this comment.
A couple more locations missing the integrity checks
blacha
approved these changes
Oct 28, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
The MapLibre examples load versions from 1.14.0-rc.1 to 4.5.0, and the swipe example also loads Mapbox GL JS 2.3 only to get the compare plugin.
Modifications
Loads MapLibre GL JS 6.16 in the eight docs and landing examples. 6.x ships as ES modules only, so the scripts become module scripts that import it, and the
integrityattributes go since a module import can't carry one. The swipe example uses@maplibre/maplibre-gl-compareinstead of Mapbox GL JS andmapbox-gl-compare.The swipe example on 6.16 with
@maplibre/maplibre-gl-compareVerification
Opened all eight in Chrome, the landing ones on basemaps.linz.govt.nz with an API key in localStorage. They load with no console errors or failed requests, the two maps in the opacity and swipe examples stay in sync, the slider and the swiper work, and terrain loads in the elevation example. The docs build gives the same warnings as on master.