- ...Add new stuff here...
- ...Add new stuff here...
- Use named imports internally - no package entrypoints changed (#904)
- Add projection type expression syntax (#888)
- Add
vertical-perspective
projection (#890)
- Added
centerAltitude
property to stylesheet (#851)
- Aligned the implementation of
["geometry-type"]
with its spec. Now, when applicable,["geometry-type"]
returns values not available while using"$type"
:"MultiPoint"
,"MultiLineString"
, and"MultiPolygon"
. The behaviour of"$type"
has not changed. (#519)
- Added
roll
property to stylesheet (#850)
- The
index-of
,length
, andslice
expression operators count a UTF-16 surrogate pair as a single character. (#779)
- Added
Projection
specifications #687 - Updated
Sky
specifications to support atmosphere and other required features #686
- Change
assert
towith
in JSON modules. Requires Node.js 18.20.0 or later, and supports Node.js 22.0.0 or later - #675
- Support
distance
expression in web style spec - #642
- Add missing sky in diff results #518
- Add
latest.json
to dist folder to allow using the full version of the spec #490
- Add back
migrate
,validate
andformat
to the exported methods of this package #464 - Add terrain to diff method and improve type. This also removes the
operations
from the API #460 - Improve the type of
data
in theGeoJSONSourceSpecification
for TypeScript #463. - Add expression tests to this repo #476
- Add Sky spec, this is only the definition, no implementation at this point, only validation #478
- Fix queryRenderedFeatures Within a FeatureCollection of polygons #477
- Improve types for feature to include
unknown
#365 - Improve sprite documentation and supported versions #390
- Add raster dem source
redFactor
,greenFactor
,blueFactor
,baseShift
properties #326 - Improve error messages around
hillshade
layers not usingraster-dem
sources #353
- Document
raster-fade-duration
property's effect on rendering a video. #297 - Add and expose
isZoomExpression
. #267
- Add style property definition and validation for symbol layer
text-variable-anchor-offset
layout property. #112
- Trim css color before parsing #255
- Skip running color match regex for hex color or rgb, if not required #186
- Remove mapbox reference from docs and test cases #111
- Custom CSS Color 4 compliant css color parser #175
- Use D50 white point instead of D65 in HCL/LAB color spaces #146
- Automated migration of not-CSS-Color-specification-compliant hsl color values #135
- Restore support for
Color
instances inColor.parse
#128
- Add support for defining colors using CSS Color 4 syntax #94
-
Fix color interpolation in HCL and LAB color spaces to use d50 white point instead of d65, in conformance with CSS spec #146
-
Fix incorrect color interpolation in HCL and LAB color spaces when interpolation results are outside the sRGB gamut. #94
Interpretation of interpolation of colors with alpha channel equal to 0 has changed. When interpolating colors with alpha channel equal to 0, the values of the other color channels in the specified color space are included in the calculation. Previously they were ignored and only the alpha value of the other, not fully transparent, color was interpolated. #94
- The maplibre style specification and utilities now has it's own repository. The major bump is mainly a precautionary measure, in case the restructuring causes friction.
- Add support for multiple sprites in one style #1805
- Fix errors when running style-spec bin scripts and added missing help. Removed unnecessary script 'gl-style-composite'. #1971
- Generated typings file as not created in the build process and was added in this version #1470
- Renamed
ParsingError
toExpressionParsingError
as there were two with the same name and added typescript typings #1468
- Update
icon-padding
symbol layout property to support asymmetric padding #1289
- index.js has been renamed to index.cjs to fix the 'is treated as an ES module file' error in node 12+ #1223
- Add
icon-overlap
andtext-overlap
symbol layout properties #347 - Deprecate
icon-allow-overlap
andtext-allow-overlap
symbol layout properties.icon-overlap
andtext-overlap
are their replacements.
- The migration to TypeScript #209 removed support for the
mapbox://
protocol.
- Fix node entry points #400
- Migrate MapLibre GL JS and the style specification to TypeScript #209
- Remove the
--mapbox-api-supported
option of thegl-style-validate
utility.
- Add a
filter
option for GeoJSON sources to filter out features prior to processing (e.g. before clustering). #9864
-
Added
volatile
source property to control storing the tiles in local storage. (#9702) -
Added
clusterMinPoints
option for clustered GeoJSON sources that defines the minimum number of points to form a cluster. (#9748)
- Add
distance
expression tostyle-spec
. This expression returns the shortest distance between a feature and an input geometry (#9655)
- Add
index-of
andslice
expressions to search arrays and strings for the first occurrence of a specified value and return a section of the original array or string (#9450) (h/t lbutler)
- Expose
expression.isExpressionFilter(..)
from the bundle. (#9530)
- Fix a broken module import where the
style-spec
package was importing files frommapbox-gl-js
, it's parent repo, causing downstream build systems to break. (#9522)
- Add
within
expression for testing whether an evaluated feature lies within a given GeoJSON object (#9352). For example:
"icon-opacity": ["case", ["==", ["within", "some-polygon"], true], 1, ["==", ["within", "some-polygon"], false], 0]
- Improve scaling of patterns used in
line-pattern
on all device resolutions and pixel ratios (#9266)
- Allow needle argument to
in
expression to be false (#9295) - Fix a bug where
icon-image
expression that evaluates to an empty string (''
) produced a warning (#9380) - Prevent exception resulting from
line-dash-array
of empty length (#9385)
- Add
promoteId
option to use a feature property as ID for feature state (#8987) - Update
symbol-avoid-edges
documentation regarding global collision detection (#9157) - Remove reference to
in
function which has been replaced by thein
expression (#9102)
- Fix bug where
symbol-sort-key
was not used for collisions that crossed tile boundaries (#9054)
- Fix style validation error messages not being displayed (#9073)
- Add ability to insert images into text labels using an
image
expression within aformat
expression:"text-field": ["format", "Some text", ["image", "my-image"], "some more text"]
(#8904) - Add
in
expression. It can check if a value is in an array (["in", value, array]
) or a substring is in a string (["in", substring, string]
) (#8876) - Add support for stretchable images (aka nine-part or nine-patch images). Stretchable images can be used with
icon-text-fit
to draw resized images with unstretched corners and borders. (#8997) - Add an es modules build of for mapbox-gl-style-spec in dist/ (#8247) (h/t ahocevar)
- Rename
Image
type toResolvedImage
, to better represent the result of animage
expression evaluation. (#8901)
- Add
image
expression operator to determine image availability (#8684) - Add a style-spec function to validate that styles are compatible with the Mapbox API (#8663)
- Introduce
text-writing-mode
symbol layer property to allow placing point labels vertically. #8399 - Allow
text-color
to be used in formatted expressions to be able to draw different parts of a label in different colors. #8068 - Improve conversion of legacy filters with duplicate values. #8542
- Fix SDK support spec section for variable label placement (#8384) (h/t @pozdnyakov)
- Add SDK support spec section for text-radial-offset (#8401)
- Add
*-sort-key
layout property for circle, fill, line (#8467) - Expose convertFilter API in the style specification (#8493)
- Fix format expression options validation (#8339)
- Fix SDK support information for style properties added in v13.7.0: (#8384)
- Add missing SDK support section for
text-radial-offset
property - Assign SDK versions for
text-variable-anchor
andtext-justify: auto
- Add missing SDK support section for
- Add
text-radial-offset
style property (#7596) - Add
text-variable-anchor
style property (#7596) - Add
auto
value totext-justify
style property (#7596)
- Add
clusterProperties
option for aggregated cluster properties (#2412, fixed by #7584) - Add
number-format
expression (#7626) - Add
symbol-sort-key
style property (#7678)
- Tighten style validation
- Expressions
- Fix
let
expression stripping expected type during parsing (#7300, fixed by #7301) - Fix superfluous wrapping of literals in
literal
expression (#7336, fixed by #7337) - Allow calling
to-color
on values that are already of typeColor
(#7260) - Fix
to-array
for empty arrays ((#7261)) - Fix identity functions for
text-field
when using formatted text (#7351) - Fix coercion of
null
to0
into-number
expression (#7083, fixed by #7274)
- Fix
- Add
fill-extrusion-vertical-gradient
property for controlling shading of fill extrusions (#5768, fixed by #6841)
- Update the style-spec's old
gl-style-migrate
script to include conversion of legacy functions and filters to their expression equivalents (#6927, fixed by #7095)
- Add
symbol-z-order
symbol layout property to style spec (#7219) - Implement data-driven styling support for
*-pattern properties
(#6289)
- Improve formatting for style output (#7029)
- Add
raster-resampling
raster paint property (#6411) (h/t andrewharvey) - Add
symbol-placement: line-center
(#6821)
- Align implicit type behavior of
match
expressions with withcase/==
(#6684) - Update spec so that documentation can automatically capture which functions and expressions can be used with which properties (#6521)
- Add
feature-state
#6263 - Add support for GeoJSON attribution (#6364) (h/t andrewharvey)
- Upgrade to Flow 0.69 (#6594)
- Use named exports for style-spec entrypoint module (#6601
Malformed package published to NPM.
- The
"to-string"
expression operator now converts null to an empty string rather than to"null"
. #6534
- 🌈 Add line-gradient property #6303
- Add collator expression for controlling case and diacritic sensitivity in string comparisons #6270
- Add
is-supported-script
expression for determining if a script is supported. #6260 - Add
collator
expression for controlling case and diacritic sensitivity in string comparisons #6270 - Add
abs
,round
,floor
, andceil
expression operators #6496 - Add support for Mapzen Terrarium tiles in raster-dem sources #6110
- Fix Rollup build 6575
- Update SDK support information for
text-font
, andheatmap-color
, andhillshade
layer properties.
- Avoid use of
new Function
for filters by converting old-style filters to expressions #5665.
- Remove constants validating code #5885
"colorSpace": "hcl"
now uses shortest-path interpolation for hue #5811
- Introduce client-side hillshading with
raster-dem
source type andhillshade
layer type #5286 - Add Color#toString and expose Color publicly #5866
- Improve typing for
==
and!=
expressions #5840 - Made
coalesce
expressions more useful #5755 - Enable implicit type assertions for array types #5738
- Fix standalone browser build #5736, #5906
- Handle NaN as input to step and interpolate expressions #5757
- Fix style diffing for changes to GeoJSON sources #5745
- Mark layer "type" property as required #5849
- Remove support for validating and migrating v6 styles #5604
- Remove support for validating v7 styles #5604
- Remove spaces after commas in
to-string
representation of colors #5480 - Fix bugs preventing
mapbox-gl-style-spec
package on NPM from being used externally #5502 - Fix flow-typed interface generator #5478
- Export
function
#5584 - Export
StylePropertySpecification
type #5593 - Split the
source_tile
entry in the JSON schema intosource_vector
andsource_raster
#5604
- Require that
heatmap-color
use expressions instead of stop functions #5624 - Remove support for including
{tokens}
in expressions fortext-field
andicon-image
#5599 - Disallow interpolation in expressions for
line-dasharray
#5519 - Validate that zoom expressions only appear at the top level of an expression #5609
- Validate that
step
andinterpolate
expressions don't have any duplicate stops #5605 - Split
curve
expression intostep
andinterpolate
expressions #5542 - Validate expression values for enum-typed properties #5589
- Improve validation to catch uses of deprecated function syntax #5667
- Fix bug preventing @mapbox/mapbox-gl-style-spec package from being usable outside of mapbox-gl-js (#5502)
- Add expression and heatmap layer support. See Mapbox GL JS v0.40.1 changelog entry for details.
- Remove
fast-stable-stringify
dependency (#5152)
- Fix validation error on categorical zoom-and-property functions (#4220)
- Relax requirement that styles using "icon-image" must have a "sprite"
- Prevent infinite loop in binarySearchForIndex when duplicate stops are present. (#4503)
- Ensure generated composite function stops are in the correct order (#4509)
- Update SDK support matrices to be current as of GL JS v0.35.1, iOS SDK v3.5.0, Android SDK 5.0.0
- Remove support for implicitly-categorical functions
- BREAKING CHANGE: the API for the
function
module has changed. Theinterpolated
andpiecewise-constant
exports were replaced with a single unnamed export, a function which accepts an object conforming to the style spec "function" definition, and an object defining a style spec property. It handles color parsing and validation of feature values internally. - Functions now support a "default" property.
parseColor
was promoted from gl-js.
- Merge
feature-filter
repository into this repository #639
v8.0.0 styles are fully compatible with v8.10.0.
- Added
colorSpace
option to functions - Added
fill-extrusion
layer type - Add top-level
light
property - Remove increase maximum
maxzoom
to 24 - Deprecate paint classes
⚠️ - Increase strictness of function validation
- Added
deref
utility - Added
group_by_layout
utility - Merge
mapbox-gl-function
repository into this repository
v8.0.0 styles are fully compatible with v8.9.0.
- Added identity functions
- Added
auto
value which represents the calculated default value
v8.0.0 styles are fully compatible with v8.8.1.
- Fixed style validation for layers with invalid types
v8.0.0 styles are fully compatible with v8.8.0.
- Clarified documentation around fill-opacity.
- Update function documentation and validation for property functions.
- Add text-pitch-alignment property.
- Add icon-text-fit, icon-text-fit-padding properties.
v8.0.0 styles are fully compatible with v8.7.0.
- Add support for has / !has operators.
v8.0.0 styles are fully compatible with v8.6.0.
- Added support for zoom and feature driven functions.
v8.0.0 styles are fully compatible with v8.4.2.
- Refactored style validator to expose more granular validation methods
v8.0.0 styles are fully compatible with v8.4.1.
- Revert ramp validation checks that broke some styles.
v8.0.0 styles are fully compatible with v8.4.0.
- Added
cluster
,clusterRadius
,clusterMaxZoom
GeoJSON source properties.
v8.0.0 styles are fully compatible with v8.3.0.
- Added
line-offset
style property
v8.0.0 styles are fully compatible with v8.2.1.
- Enforce that all layers that use a vector source specify a "source-layer"
v8.0.0 styles are fully compatible with v8.2.0.
- Add inline
example
property. - Enforce that all style properties must have documentation in
doc
property. - Create minified style specs with
doc
andexample
properties removed. validate
now validates against minified style spec.format
now acceptsspace
option to use withJSON.stringify
.- Remove
gl-style-spritify
. Mapbox GL sprites are now created automatically by the Mapbox style APIs, or for hand-crafted styles, by spritezero-cli.
v8.0.0 styles are fully compatible with v8.1.0.
- [BREAKING] Simplified layout/paint layer property types to more closely align with v7 types.
- Fixed migration script compatibility with newer versions of Node.js and io.js
- Removed
constants
from schema, they were deprecated in v8 - Added style diff utility to generate semantic deltas between two stylesheets
- Added
visibility
property tocircle
layer type - Added
pitch
property to stylesheet
Introduction of Mapbox GL style specification v8. To migrate a v7 style to v8,
use the gl-style-migrate
script as described in the README.
- [BREAKING] The value of the
text-font
property is now an array of strings, rather than a single comma separated string. - [BREAKING] Renamed
symbol-min-distance
tosymbol-spacing
. - [BREAKING] Renamed
background-image
tobackground-pattern
. - [BREAKING] Renamed
line-image
toline-pattern
. - [BREAKING] Renamed
fill-image
tofill-pattern
. - [BREAKING] Renamed the
url
property of the video source type tourls
. - [BREAKING] Coordinates in video sources are now specified in [lon, lat] order.
- [BREAKING] Removed
text-max-size
andicon-max-size
properties; these are now calculated automatically. - [BREAKING]
text-size
andicon-size
are now layout properties instead of paint properties. - [BREAKING] Constants are no longer supported. If you are editing styles by hand and want to use constants, you can use a preprocessing step with a tool like ScreeSS.
- [BREAKING] The format for
mapbox://
glyphs URLs has changed; you should now usemapbox://fonts/mapbox/{fontstack}/{range}.pbf
. - [BREAKING] Reversed the priority of layers for calculating label placement: labels for layers that appear later in the style now have priority over earlier layers.
- Added a new
image
source type. - Added a new
circle
layer type. - Default map center location can now be set in the style.
- Added
mapbox://
sprite URLsmapbox://sprite/{user | "mapbox"}/{id}
- Added gl-style-composite script, for auto-compositing sources in a style.
- Use JSON.stringify for formatting instead of js-beautify
Introduction of Mapbox GL style specification v7.
- [BREAKING] Improve dashed lines (#234)
- [BREAKING] Remove prerendered layers (#232)
- Explicit visibility property (#212)
- Functions for all properties (#237)
Introduction of Mapbox GL style specification v6.
- [BREAKING] New filter syntax (#178)
- [BREAKING] Line gap property (#131)
- [BREAKING] Remove dashes from min/max-zoom (#175)
- [BREAKING] New layout/paint terminology (#166)
- [BREAKING] Single text positioning property (#197)
- Added requirements (#200)
- Added minimum, maximum, and period values (#198)
- [BREAKING] Switch to suffix for transition properties (
transition-*
->*-transition
). - Added support for remote, non-Mapbox TileJSON sources.
- [BREAKING] Source
minZoom
andmaxZoom
renamed tominzoom
and `maxzoom to match TileJSON. - Added support for
mapbox://
glyph URLs. - [BREAKING] Renamed
raster-fade
toraster-fade-duration
. - Added background-opacity property.
- Added "tokens" property to string values that can autocomplete fields from layers
- Added "units" property to describe value types
- Initial public release