v1.9.0
ryanhamley
released this
23 Mar 17:20
·
7 commits
to release-caspian
since this release
With this release, we're adding a new changelog policy to our contribution guidelines.
This release also fixes several long-standing bugs and unintentional rendering behavior with line-pattern
. The fixes come with a visual change to how patterns added with line-pattern
scale. Previously, patterns that became larger than the line would be clipped, sometimes distorting the pattern, particularly on mobile and retina devices. Now the pattern will be scaled to fit under all circumstances. #9266 showcases examples of the visual differences. For more information and to provide feedback on this change, see #9394.
✨ Features
- Add
within
expression for testing whether an evaluated feature lies within a given GeoJSON object (#9352).- We are aware of an edge case in which points with wrapped coordinates (e.g. longitude -185) are not evaluated properly. See (#9442) for more information.
- An example of the
within
expression:
"icon-opacity": ["case", ["==", ["within", "some-polygon"], true], 1, ["==", ["within", "some-polygon"], false], 0]
- Map API functions such as
easeTo
andflyTo
now supportpadding: PaddingOptions
which lets developers shift a map's center of perspective when building floating sidebars (#8638)
🍏 Improvements
- Results from
queryRenderedFeatures
now have evaluated property values rather than raw expressions (#9198) - Improve scaling of patterns used in
line-pattern
on all device resolutions and pixel ratios (#9266) - Slightly improve GPU memory footprint (#9377)
LngLatBounds.extend
is more flexible because it now accepts objects withlat
andlon
properties as well as arrays of coordinates (#9293)- Reduce bundle size and improve visual quality of
showTileBoundaries
debug text (#9267)
🐞 Bug fixes
- Correctly adjust patterns added with
addImage(id, image, pixelRatio)
by the asset pixel ratio, not the device pixel ratio (#9372) - Allow needle argument to
in
expression to be false (#9295) - Fix exception thrown when trying to set
feature-state
for a layer that has been removed, fixes #8634 (#9305) - Fix a bug where maps were not displaying inside elements with
dir=rtl
(#9332) - Fix a rendering error for very old versions of Chrome (ca. 2016) where text would appear much bigger than intended (#9349)
- Prevent exception resulting from
line-dash-array
of empty length (#9385) - Fix a bug where
icon-image
expression that evaluates to an empty string (''
) produced a warning (#9380) - Fix a bug where certain
popup
methods threw errors when accessing the container element before it was created, fixes #9429(#9433)