This repository was archived by the owner on Jul 28, 2025. It is now read-only.
[Snyk] Upgrade ol from 10.2.1 to 10.4.0#5
Open
iAziz786 wants to merge 1 commit intofeature/react-pdffrom
Open
Conversation
Snyk has created this PR to upgrade ol from 10.2.1 to 10.4.0. See this package in npm: ol See this project in Snyk: https://app.snyk.io/org/vijay-sok/project/9f82fabb-f3b8-4d89-8942-766ed318361a?utm_source=github&utm_medium=referral&page=upgrade-pr
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Snyk has created this PR to upgrade ol from 10.2.1 to 10.4.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 207 versions ahead of your current version.
The recommended version was released 2 months ago.
Release notes
Package name: ol
With more than 40 pull requests, the 10.4 release brings performance improvements, bug fixes, better TypeScript generics and new features. New features include a convenience
Imagelayer loader for debugging MapServer map files using the MapServer CGI API, and an experimentalWebGLVectorTilelayer.Upgrade notes
Deprecation of ol/layer/WebGLPoints
Use
ol/layer/WebGLVectorinstead. Besides rendering points it will also render lines and polygons.In most cases this is a drop-in replacement. To use filtering the style and filter have to be in a nested object.
new WebGLPointsLayer({
filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
style: {
'circle-radius': 8,
'circle-fill-color': 'blue',
},
source: vectorSource,
})
// After
new WebGLVectorLayer({
style: [{
filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
style: {
'circle-radius': 8,
'circle-fill-color': 'blue',
},
}],
source: vectorSource,
})
ol/style/webglmodule removalWebGL renderers used to rely on the
WebGLStyletype in theol/style/webglmodule. This is not the case anymore, all renderers now rely onFlatStylefromol/style/flat.ol-mapbox-style compatibility
This version of OpenLayers is only compatible with
ol-mapbox-style@12.4.0or higher.Returning false from a one-time listener added with
onceReturning false from the listener function will now stop propagation, when the listener is added with
once.Previously this only worked with the
onmethod.The
filteroption forWebGLPointsLayerhas changedThe filter option for the
WebGLPointsLayermust now be specified alongside other options instead of being part of thestyleobject. Note that theWebGLPointsLayeris not part of the stable API and is subject to breaking changes between major releases.new WebGLPointsLayer({
style: {
filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
'circle-radius': 8,
'circle-fill-color': 'blue',
},
source: vectorSource,
})
// Now
new WebGLPointsLayer({
filter: ['between', ['get', 'year'], ['var', 'minYear'], ['var', 'maxYear']],
style: {
'circle-radius': 8,
'circle-fill-color': 'blue',
},
source: vectorSource,
})
Get ready for future changes
We're planning to stop providing barrel files, which will impact how you import modules from OpenLayers. See #16461 for details. To get your code ready for that upcoming change, you can already help us test the
replace-barrel-importscodemod from the @ openlayers/codemod package.List of all changes
renderedProjectionin web worker's offscreen canvas layer example by @ bilskip in #16522