CHANGELOG.md
May 6, 2026 · View on GitHub
3.24.0-rc.1
Features and improvements ✨
- Introduce Level of Detail (LOD) support for landmark models, enabling automatic switching between model versions based on camera distance.
- Support additive blend mode with clamped density by setting the
line-blend-additive-clampproperty. - Improve rendering performance by reducing per-frame matrix allocations.
- Improve rendering performance via parallel shader compilation on supported devices.
- Improve rendering performance by advancing shader precompilation.
- Improve shadow rendering performance.
- Improve vector icon loading performance.
- Improve initial load by skipping redundant config-related style layers updates in Web Workers.
- Improve initial load by rescheduling shader precompilation to occur during browser idle time after the map's
idleevent. - Improve model processing performance.
- Improve performance and memory footprint by streamlining communication between the main thread and Web Workers.
- Reduce first-interaction jank by optimizing shader compilation pipeline behavior.
- Optimize expression parsing performance.
- Improve an error messaging for the
line-trim-offsetproperty withoutlineMetrics.
Bug fixes 🐞
- Fix LUT to properly work with premultiplied color.
- Fix a potential memory leak and crash occurring when a map was destroyed.
3.23.1
Bug fixes 🐞
- Fix a rendering error occurring with
fill-extrusionlayers when terrain is enabled in specific edge cases.
3.23.0
Features and improvements ✨
- Improve the performance of symbol layers on old devices.
- Add
TileProviderfor raster and raster-dem sources, adding support for PMTiles with raster tiles. - Enable client-side fontstack compositing by default. When multiple fonts are requested they are now fetched individually and composited on the client.
- Promote interactions API to stable.
- Add a bundler-friendly ESM bundle in the NPM package (
import mapboxgl from 'mapbox-gl/esm'). - Lazy-load procedural buildings and precipitation code when using the ESM entry point.
Bug fixes 🐞
- Fix values smaller than 1 in
line-dasharraynot working. - Fix a render issue where black boxes could appear instead of symbols briefly in some environments.
- Fix
scale-factorbeing applied twice to icons with feature-dependenticon-size. - Fix redundant WASM requests on map load when using the Standard style.
- Fix hillshade rendering issue when using Safari in private browsing mode.
3.22.0
Bug fixes 🐞
- Fix a crash on PowerVR devices.
- Fix nested scopes support in clip layers.
- Skip sub-pixel line dilution for intentionally thin lines.
- Skip map-sessions request when
baseApiUrlis not a Mapbox host.
3.21.0
Features and improvements ✨
- Introduce the
TileProviderAPI, a mechanism for extending GL JS with custom vector tile providers. - Add first-class support for PMTiles via the new
TileProviderAPI and an official plugin (``mapbox-gl-pmtiles-provider.js`) that loads on demand. - Add experimental
line-blend-modeproperty for rendering lines usingadditiveormultiplyblending. - Slightly improve overall map loading times.
- Improve symbol layer rendering performance (by adopting Uniform Buffer Objects for data-driven properties).
- Improve indoor maps loading performance.
Bug fixes 🐞
- Fix dragging gesture not working on the compass control.
- Various fixes and improvements for the Appearances API.
- Fix an edge case when combining custom icons with images included in the style's sprite.
- Fix
setWorldviewnot updating layout properties correctly. - Fix an issue when rendering stacked underground 3D roads.
- Fix line dashes with non-integer total array lengths.
- Fix various rendering issues when using
*-cutoff-fade-rangeproperties. - Fix
cliplayer not clippingfill-extrusionambient occlusion.
Breaking changes ⚠️
- Removed
mapbox-gl-unminified.jsbundle in the distribution — please switch to eithermapbox-gl.js,mapbox-gl-dev.js, or the newesm-min/mapbox-gl.jsESM bundle. - Removed
spriteFormatMapoption — now Mapbox styles will always use vector icons, while non-Mapbox styles will continue using classic raster sprites.
3.20.0
Features and improvements ✨
- Improve memory efficiency by sharing image resources for symbol layers across map tiles.
Bug fixes 🐞
- Fix icons disappearing when changing the color theme.
- Fix display of symbols added via the Appearances runtime API.
3.19.1
Bug fixes 🐞
- Removed the unused
@types/mapbox__point-geometrypackage that was causing some Typescript builds to fail.
3.19.0
Features and improvements ✨
- Promote elevated lines properties to stable:
line-z-offsetandline-elevation-reference. - Add experimental
text-size-scale-rangeandicon-size-scale-rangestyle properties. - Add experimental
Map#setScaleFactor/Map#getScaleFactormethods for controlling symbol layer scaling. - Apply global scale factor to images within
text-field. - Fix z-fighting for elevated raster layers.
- Add
raster-elevation-referencepaint property to elevate raster layers relative to ground instead of sea level. - Add
line-elevation-ground-scalelayout property to scale elevated lines with terrain exaggeration. - Use native async/await when loading models. Note: Please ensure GL JS is excluded from transpilation in your build setup.
- Explicitly state minimum supported browser versions in
browserslist. - Support
pitchanddistanceexpressions in filters. - Support incremental updates when using
setFeatureState. - Add experimental
Map#setNearClipOffset/Map#getNearClipOffsetmethods to control the near clip offset when ortohographic projections are used.
Bug fixes 🐞
- Fix
RasterArrayTileSource#reload()not working correctly. - Add request cancellation support to the
ModelSource. - Fix flickering of aliased thin lines.
- Fix elevated line bevel join artifacts at sharp corners.
- Fix regressions in
NavigationControl. - Fix namespace conflicts in different featuresets' selectors.
- Recalculate layers with
visibility: nonein case properties were changed. - Fix bug in border update logic of
fill-extrusionlayer, overriding clip layer's behaviour. - Fix empty tiles on non-integer maxZoom when terrain was used.
- Fix prototype pollution via Style JSON.
3.18.1
Features and improvements ✨
- Add support for
visibilityproperty in clip layers. - Improve
raster-colorprecision for fine-grained value ranges.
Bug fixes 🐞
- Fix color interpolation throwing errors in edge cases.
- Fix appearances with no
icon-size. - Fix disappearing symbols when used with elevated raster layers.
3.18.0
Features and improvements ✨
- Add
scaleFactorsupport for images withintext-field. - Add
showButtonoption toGeolocateControlthat allows hiding the control button. - Add
followUserLocationoption andsetFollowUserLocationmethod toGeolocateControlto control whether the map follows the user's location. - Improve
GeolocateControltimeout handling. - Add support for
text-rotate,text-size, andtext-offsetproperties in appearances. - Add
shadow-draw-before-layerproperty to directional light, allowing control over shadow draw order in the layer stack. - Add
model-allow-density-reductionproperty to model layers. (h/t @JoshuaJMoore)
Bug fixes 🐞
- Fix interaction handlers not working on model layers.
- Fix stretchable icons without
icon-text-fitrendering with an incorrect size. - Fix
icon-sizenot working correctly withcoalesceexpressions. - Fix
raster-colorinterpolation when usingnearestraster-resampling. - Fix render cut off for elevated raster-layer rendering in ortho projection range.
- Fix symbol placement with optional and missing parts.
- Expose all error properties for
GeolocateControlerror event (h/t @lucavb). - Fix an error when querying multipolygons in
dynamic: truemode. - Fix
AttributionControllinks sanitization. - Fix appearances with no
icon-sizeusing the default value instead of the layout-defined one. - Fix updates to model source via
ModelSource.setModelswhile models are still loading. - Fix polygon clipping precision errors causing rendering artifacts in elevated structures.
- Preserve featuresets in
map.getStyle()output. - Expose TypeScript types from
@mapbox/mapbox-gl-style-specfor direct imports.
3.17.0
Features and improvements ✨
- Add experimental ESM support.
- Make
line-emissive-strengthdata-driven. - Remove experimental flag from the
extra_boundsproperty of raster and vector sources. - Remove experimental flag from
modellayer. - Remove experimental flag from
buildinglayer. - Improve vector icons rasterization performance.
- Improve shadow rendering performance.
- Improve
buildinglayer performance. - Improve shader initialization performance.
Bug fixes 🐞
- Fix polygon rendering for dynamic GeoJSON sources.
- Fix
raster-arraylayers not working on iOS < 18.4. - Fix a performance issue for symbol layers with zero fade duration and static camera.
- Fix occasional WebGL texture warnings when rendering terrain.
- Fix features not being localized in dynamic filters when a worldview is set.
- Fix an issue with clipping models on Standard.
- Fix an issue with models flashing on
setData. - Fix an issue with incorrect scoping of models added during runtime.
- Fix line patterns not elevating properly on HD roads.
- Sanitize attributions in
AttributionControl. - Correctly support filtered features in appearances.
- Fix an issue occuring when expressions are used in appearances.
- Fix appearance optimization that resulted in wrong appearances being rendered.
- Fix appearance icons not changing when feature state changed multiple times.
- Improve TypeScript types.
3.16.0
Features and improvements ✨
- Introduce experimental Appearances API for managing layer styling based on feature state.
- Add
MapsetLayerPropertythat combinessetLayoutProperty&setPaintPropertyinto one method for convenience. - Add support for node/material overrides & other improvements to
modelsource and layer. - Various improvements & fixes for upcoming 3D features (indoor, procedural buildings & elevated roads).
- Add response headers to the
sourcedataevent data. - Improve TypeScript types for style specification.
Bug fixes 🐞
- Fix raster particle layer not rendering correctly on styles with emissive light.
- Fix icons of different sizes rendering incorrectly in appearances.
- Fix worldview filtering with dynamic expressions.
- Improve accuracy of
queryRenderedFeaturesfor model layers. - Fix a bug with heatmap sometimes disappearing after switching projection.
- Fix rendering of model layer with vector source on globe projection.
- Fix flickering of fill-extrusion buildings when using clip layers.
- Fix inaccuracies in 3D model query intersection.
- Fix the passing of
GeolocationPositiontogeolocateevent listeners. - Fix the placement of line-aligned text with a non-default
scaleFactor.
3.15.0
Features and improvements ✨
- Add
queryRasterValuemethod for querying values inraster-arraylayers. - Add
icon-image-use-themeproperty. - Add support for Mapbox vector tiles with precalculated line metrics (for line gradients).
- Improve HD Roads loading performance.
- Optimize applying LUT when updating images at runtime.
- Improve TypeScript types in Style Spec validation methods.
- Slightly improve
hslaexpression performance. - Optimize applying LUT for patterns.
- Round
queryRasterValueresults to 12 decimal digits to fix precision issues. - Improvements on typing and testing.
Bug fixes 🐞
- Fix an issue with refreshing expired raster array tiles.
- Fix an error on GeoJSON with
"Infinity"and similar ids. - Fix
GL_INVALID_VALUEconsole warning on Mapbox Satellite Standard and a few other styles. - Fix model layer positioning during globe to mercator transition.
- Fix an issue with incorrect transparency for some icons with LUT applied.
- Fix an issue where updating
*-occlusion-opacityproperties didn't have any effect. - Fix an issue with MRT layers throwing an error when reloading.
- Fix occlusion layer ordering.
- Fix an issue where using too many data-driven properties on the symbol layer could break the map.
- Fix gradients and interpolations with fully-transparent colors.
- Fix model layer density reduction.
- Fix performance regression on styles that use feature-state expressions.
3.14.0
Breaking changes ⚠️
- Imported styles will use the
glyphsURL template from the root style instead of their own.
Features and improvements ✨
- Add a
splitexpression to divide a string into an array of substrings based on a specified delimiter. - Improve memory usage for GeoJSON sources.
Bug fixes 🐞
- Fix an issue with querying rendered features during the globe-to-Mercator transition.
- Fix resources cleanup when removing a map with a terrain or/and vector icons.
- Fix an issue where a single primary image was not rendered correctly with
icon-image-cross-fade. - Fix an edge case involving the mixing of vertical and horizontal writing modes.
- Fix rendering of multiple
rasterlayers from a singleraster-arraysource. - Fix restoration of maps with background patterns, heatmap, image, video, or raster sources after WebGL context loss.
- Fix memory spike when calling
setDataon large datasets.
3.13.0
Breaking changes ⚠️
interpolateexpression will interpolate between non-alpha-premultiplied colors. The change might affectraster-particle-color,line-gradient, andheatmap-color.rgbexpression will return non-premultiplied-alpha color.
Features and improvements ✨
- Add the
["worldview"]expression, which returns the currentworldviewof the map. - Add
model-translationsupport for batched model layers. - Improve indoor level interaction.
- Add support of gradient transforms in the fill style of vector icons.
Bug fixes 🐞
- Fix querying and styling issues with multiple model layers referencing the same source.
- Fix
mapbox-gl-rtl-textv0.3.0 plugin not loading in certain configurations. - Fix icons with
text-variable-anchordisappearing. - Fix minor distortions on vector icons in some cases.
- Fix zooming over terrain with negative altitude values.
- Fix interactions to not throw on
mouseleavewithoutmouseenter. - Fix shadow rendering issues on underground structures.
- Fix striping artifacts when rendering shadows on some GPU configurations.
- Fix errors when viewing a style with filtered model layers.
- Fix parsing of
color-use-themeproperty of 3D lights. - Fix feature-dependent
configexpressions (h/t @brncsk) #13453. - Fix reset of the indoor floorplan selection after moving the camera.
- Fix excessive rerendering of the map after
setStylewith the same URL of an import. - Fix source reloading during mercator-globe transition with terrain.
- Fix color of semi-transparent vector icons.
Workflow 🛠️
- Switched from CircleCI to GitHub Actions for continuous integration tests.
3.12.0
Features and improvements ✨
- Add experimental support for rendering 3D road intersections.
- Add shadow rendering support for elevated lines.
- Add
wrapTileIdproperty toCustomLayerInterfaceto control whether tile IDs are wrapped across world copies during rendering. - Add
line-pattern-cross-fade,fill-pattern-cross-fade, andfill-extrusion-pattern-cross-fadeproperties for smooth transitions between pattern images. - Add support for
extra_boundsin TileJSON for more fine-grained control over tile requests, particularly when dealing with sparse data coverage. - Improve performance by lazy loading 3D models.
- Slightly improve JS bundle sizes.
- Various TypeScript types improvements.
Bug fixes 🐞
- Fixed an issue where calling
setDataon symbol layers could cause flickering. - Expose
CustomSourceInterfaceTypeScript type that was missing in the public interface. - Fix some edge cases related to rendering of elevated structures.
- Relax
line-gradientvalidation to work not only on GeoJSON, but also on vector tile sources if they havemapbox_clip_startandmapbox_clip_endproperties precomputed. - Fix
styleimagemissingevent not firing in certain scenarios.
3.11.1
- Improve icon loading performance, in particular for landmark icons.
- Fix
undefinedpassed inMarkeroptions not falling back to default values.
3.11.0
Breaking changes ⚠️
- The
atexpression does not interpolate anymore. Please useat-interpolatedif you want to keep the old behavior.
Features and improvements ✨
- Add landmark icons. Landmark icons are stylized, uniquely designed POI icons that indicate the most popular and recognizable landmarks on the map. At the time of this release, we have landmarks for 5 cities: London, Berlin, New York City, San Francisco, and Tokyo.
- Add
at-interpolatedexpression as the interpolated counterpart to theatexpression. - Add
altitudemarker property to adjust elevation. (h/t @yangtanyu) #13335. - Add
getCooperativeGesturesandsetCooperativeGesturesmap methods to control cooperative gestures logic after the map is initialized. - Add
getGlyphsUrlandsetGlyphsUrlmap methods to manage the glyphs endpoint URL. - Add
pitchRotateKeymap option to override the modifier key for rotate and pitch handlers. - Add filtering support for model layers.
- Add support for vector icons color parameters with alpha values.
Bug fixes 🐞
- Hide labels with unreadable angles.
- Fix rendering of vector image in text on HiDPI screens.
- Ensure Katakana and CJK symbols render correctly in vertical writing mode.
- Fix popup position update on map move. (h/t @ThugRaven) #13412
- Fix rendering of self-intersecting elevated lines.
- Prevent line pattern from turning black at certain zoom levels when shadows are enabled.
- Fix missing triangles in variable-width lines.
- Improve Style-Spec validator types.
- Fix reloading of tiles in style imports.
- Fix issue where updated images were never cleared after patching them.
- Fix rendering performance regression related to use-theme.
3.10.0
Features and improvements ✨
- Add support for data-driven
*-use-themeproperties. - Improve rendering of complex SVG clip paths for vector icons.
Bug fixes 🐞
- Fix some mouse gestures for Firefox 136 and later on Mac OS.
- Fix issue where the close popup button was hidden from screen readers.
- Fix updating of schema config values of imported styles.
- Fix line placement symbol disappearing issue during transition from globe.
- Fix
queryRenderedFeaturesnot working on duplicated model layers. - Fix in-place update for SDF image.
- Fix LUT not being applied to in-place updated image.
- Fix various issues with using
mouseenterandmouseleavewith Interactions API. - Fix error with interactible map elements during interaction with a map that wasn't fully loaded.
- Fix rendering of elevated and non-elevated lines on the same layer.
- Fix pixel ratio handling for patterns with vector icons.
- Fix positioning of vector icons with modified
icon-size. - Fix a blank map issue after WebGL context loss.
- Fix loss of precision for close to camera models.
- Fix transparent models not being culled when terrain is enabled.
3.9.4
- Fix vector icons rendering with stretch areas on high DPI devices.
3.9.3
- Fix issues when updating feature state on symbol layers.
- Fix canvas source not rendering correctly after a canvas resize.
3.9.2
- Fix display of user-rendered images.
- Fix a broken build issue in specific bundling configurations using Vite or ESBuild.
- Fix console error issue that sometimes occur during map initialization.
3.9.1
- Fix an error when using background patterns on styles with vector icons enabled.
- Fix
queryRenderedFeaturesnot working on styles with custom layers. - Fix small rendering artifacts on line corners when using patterns with
line-join: none. - When using
queryRenderedFeaturesandquerySourceFeatureswithfeatureset, fixfilteroption to apply tofeaturesetselectors rather than original properties, and addfeatureNamespacevalidation. - Fix
queryRenderedFeaturesmissingsource,sourceLayerandlayerproperties in resulting features where they should be present.
3.9.0
Breaking changes ⚠️
- Rename
featuresetproperty totargetinaddInteractionandqueryRenderedFeaturesoptions.
Features and improvements ✨
- Add experimental vector icons support.
- Add experimental precipitation support through
snowandrainstyle properties. - Add experimental features for interactive indoor maps.
- Add
to-hslaexpression. - Add
*-use-themeproperty to override the color theme for specific layers. - Add support for
color-themeoverrides in imports. - Add per-feature
mouseenter,mouseover,mouseleave, andmouseoutevents foraddInteraction. - Enable mixing
featuresetsandlayersin theMap#queryRenderedFeatures. - Improve landmark rendering performance.
- The
cliplayer is now stable and no longer marked experimental.
Bug fixes 🐞
- Fix crash on devices with PowerVR GPUs.
- Fix dark shade of fill-extrusion buildings caused by specific light directions.
- Fix double shadowing on lines at ground level.
- Fix shadow acne from 3D structures close to the ground.
- Fix update of state-dependent features during brightness changes.
- Fix an edge case with fill extrusions around tile borders not being updated correctly on terrain load.
- Fix a race condition where using
line-z-offsetwould sometimes break layer rendering order.
3.8.0
Features and improvements ✨
- Add experimental support for style-defined
featuresets, an upcoming way to query features in Mapbox Standard and other fragment-based styles. - Add experimental
MapaddInteraction/removeInteractionmethods that make it easier to manage map interactions like clicking and hovering over features. - Add experimental support for elevated lines with
line-cross-slopeandline-elevation-referenceproperties. - Add experimental
scaleFactormap option andsetScaleFactormethod to increase map label size (useful for improving accessibility or adjusting text size for different devices). - Add support for using
line-progressexpression in non-data-driven line properties. - Improve performance of dynamic brightness changes.
- Minor optimizations to reduce load time.
Bug fixes 🐞
- Fix localization when setting a worldview on the Mapbox Standard style.
- Fix raster array rendering on some Android devices.
- Fix an issue where fill-extrusion buildings would disappear when zooming out.
- Fix line joins for thick semi-transparent or blurred lines.
- Improve appearance of line corners with densely placed vertices.
- Fix anti-alising aftifacts on blurred lines.
- Fix call stack overflow caused by repeated
addImportcalls. - Fix failures when handling non-renderable characters.
- Fix rendering of Osage script.
- Fix certain edge cases when using config expression in filter properties.
- Fix patterned fill extrusions being visible with zero opacity alpha.
- Fix data-driven
symbol-z-offsetnot working properly. - Fix fill extrusions on terrain producing WebGL warnings in some cases.
- Fix
line-emissive-strengthnot being applied to patterned lines.
v3.7.0
Features and improvements ✨
- Add
background-pitch-alignmentproperty of thebackgroundlayer, which is set tomapby default but can now be set toviewport. Useful for highlighting individual features by dimming the rest of the map with a semitransparent background. - Add new control positions (
top,right,bottom, andleft) (h/t @Ethan-Guttman). - Add
retainPaddingoption for camera movement methods, which can be set tofalsefor pre-v3.4 padding behavior. - Add
configexpression support in layer filter. - Add symbol elevation properties:
symbol-z-offsetandsymbol-elevation-reference. - Add the
fill-z-offsetproperty for fill layers. - Improve
Map#fitBoundsfor the alternative projections. - Improve terrain hillshade lighting anchored to viewport.
- Improve shadow casting from 3D models.
- Improve error messages for invalid expressions.
- Skip landmarks rendering when the camera is inside them.
- Improve type checking for the
Map#setPaintPropertyandMap#setLayoutPropertymethods. - Allow the
stringevent type in Map event handlers. - Expose
RequestTransformFunction,ResourceType, andRequestParameterstypes. - Improve texture memory footprint on some platforms.
Bug fixes 🐞
- Fix feature filtering when using 3D lights.
- Fix pattern rendering issues on some devices at high zoom levels.
- Fix
fill-extrusion-line-widthrendering for large polygons - Fix symbol placement ordering when
symbol-z-orderis set toauto. - Fix the issue where
minzoomandmaxzoomproperties were ignored bycliplayers. - Fix handling previously hidden models in
cliplayers. - Fix directional light
cast-shadowsproperty type. - Fix an edge case that could produce
setStencilMode-related error in the console with the dev build. - Fix an issue where some fill extrusions could temporarily disappear when zooming quickly in certain areas.
- Fix an edge case that could cause flickering on a far plane on high zooms.
3.6.0
Features and improvements ✨
- Add wall rendering mode to the
fill-exturionlayer by introducingfill-extrusion-line-widthandfill-extrusion-line-alignmentproperties. Setfill-extrusion-line-widthto a non-zero value to render walls instead of a solid extrusion. - Improve initial load performance.
- Add inner glow effect for negative
circle-blurvalues. - Add support for inlining TileJSON in style source definitions using
datafield. - Improve 3D models' shadow appearance.
- Improve performance of updating config values of a style.
- Add more descriptive expression evaluation error messages.
- Improve TypeScript typings.
- Improve performance of symbol occlusion (visibility checks against terrain and 3D objects).
- Add
clip-layer-scopeproperty to limitcliplayer to a specific style fragment. - Add
Mapidlemethod to check whether a map is idle.
Bug fixes 🐞
- Fix
isSourceLoadedflag onsourcedataevent for already loaded sources. - Fix firing
loadevent when all tiles fail to load. - Fix performance issues when GeoJSON in
dynamicmode is updated too frequently. - Fix GeoJSON line rendering in
dynamicmode. - Fix rasterarray layer flickering from stale tiles cache.
- Fix spikes when viewing terrain-enabled maps in certain environments.
- Fix
MapgetLayernot working properly with custom layers. - Fix custom layer rendering issues on globe with high pitch.
- Fix an issue with
line-trim-offseton very long lines. - Fix rendering issues when ground effects overlap with line layers.
- Fix landmark visibility issues near tile borders.
- Fix accessibility issues with compact attribution button and logo.
3.5.2
- Improve 3D models rendering performance.
- Slightly improve terrain rendering performance.
- Fix raster particle data decoding and improve rendering quality.
- Fix 3D lighting rendering when lookup tables (LUT) image is applied.
- Fix shadows rendering artifacts on
fill-extrusion-cutoff-fade-range. - Improve TypeScript API, including strongly typed Map event listeners, improved type narrowing, and more.
3.5.1
- Revert default behavior of symbol occlusion behind terrain to maintain compatibility. Set
icon-occlusion-opacity/text-occlusion-opacityproperties to opt-in to new occlusion behavior.
3.5.0
Breaking changes ⚠️
- This release marks a significant transition for GL JS, moving from Flow to TypeScript. While we have maintained backward compatibility where possible, the community typings
@types/mapbox-glare not fully compatible with the new first-class typings. Users relying on the community typings may experience breaking changes. Please remove the@types/mapbox-gldependency and refer to the v3.5.0 migration guide for instructions on upgrading, resolving common issues, and asking questions regarding the migration to the first-class typings. We welcome your feedback and contributions to make Mapbox GL JS better.
Features and improvements ✨
- Add
color-themeproperty andMapsetColorThememethod to enable colorization with a lookup table (LUT) images. - Significantly improve performance of
updateDataforGeoJSONsources indynamicmode. - Add
icon-occlusion-opacityandtext-occlusion-opacityproperties to fade symbols behind models and landmarks. - Add
line-occlusion-opacityproperty to fade lines behind 3D objects. - Add experimental
cliplayer to filter out rendering data. - Add experimental
line-z-offsetproperty for a non-globe view. - Add
model-cutoff-fade-rangeproperty to control fade out of faraway 3D buildings. - Improve precision of
line-patternon long lines and higher zooms. - Add experimental
line-trim-colorandline-trim-fade-rangeproperties to customize rendering of lines trimmed withline-trim-offset. - Add
MapgetSlotsmethod for listing available slots of a style.
Bug fixes 🐞
- Fix a performance regression in Standard style introduced in v3.4.0.
- Fix icon rotation during globe transition.
- Fix GeoJSON data loss due to frequent
updateDatacalls. - Improve
raster-particlelayer animation. - Fix
model-front-cutoffproperty for Meshopt-encoded models. - Fix errors in the console on empty 3D tiles.
- Fix not properly detecting fingerprinting protection when adding terrain through
setTerrain. - Fix
style.loadevent missingstyleproperty. - Fix errors when using
queryRenderedFeatureson areas with missing DEM tiles when terrain is enabled.
3.4.0
Features and improvements ✨
- Add
dynamic: trueoption for GeoJSON sources that enables partial update API withsource.updateDatamethod. Further optimizations for this mode are expected in future releases. - Add
MapsetConfig,getConfig,setSchemaandgetSchemamethods for batch setting of style configuration options. - Add
configoption for theMapconstructor andsetStylemethods for conveniently setting style configuration options on map initialization. - Add
icon-color-saturation,icon-color-contrast,icon-color-brightness-minandicon-color-brightness-maxto control symbol layer appearance. - Introduce a new
line-joinmode:noneto improve line pattern distortions around joins. - Extend
model-idproperty to support URIs (in addition to style-defined model references). - Expose more parameters in map
devtoolsUI.
Bug fixes 🐞
- Fix an issue with
flyToignoringpaddingin its options. - Respect padding in
cameraForBoundson globe view. (h/t @jonasnoki) #13126 - Fix
preloadOnlynot preloading tiles from style imports. - Fix
queryRenderedFeaturesfor non-integer ID in non-tiled model sources - Fix
model-scaleproperty for large number of 3D models. - Fix flickering of
raster-particlelayer on globe view. - Improve rendering of low-resolution
raster-arraydata. - Fix an issue with GL JS bundle not building locally on Windows.
- Fix multiple edge cases when using
symbol-z-elevate. - Fix rendering issues with
raster-particlelayer on certain Android devices. - Fix shadow and lighting rendering issues in certain areas when using Mapbox Standard.
3.3.0
Features and improvements ✨
- Add a new
raster-arraysource type, representing a new experimental Mapbox Raster Tile format which encodes series of tiled raster data (such as weather time series). - Add a new
raster-particlelayer which animates particles of different speed and color based on underlyingraster-arraydata. - Add
addImport,moveImport,updateImport, andremoveImportAPI methods. - Add
getSlot, andsetSlotAPI methods to control layers' slots. - Add landmarks and models support in
queryRenderedFeatures. - Add
raster-elevationsupport for tiled raster sources. - Add
configexpression support in fog. - Improve map loading performance.
Bug fixes 🐞
- Fix zooming with the pitched camera and
maxZoom. - Fix memory leak after removing the map. (h/t @kamil-sienkiewicz-asi) #13110, #13116
- Fix broken horizon line for some camera values.
- Fix broken globe draping after updating style with
setStyle. - Fix the
zoffset when the opacity is evaluated at 0 on the zoom change. - Fix the
formatexpression in theconfigexpression. - Fix adding a marker to the map that is not loaded when fog is enabled.
- Fix symbol and icon rendering order when using
symbol-sort-keyproperty.
3.2.0
Features and improvements ✨
- Improve map loading performance.
- Add a debug UI for the development build of GL JS, enabled with
devtools: trueinMapoptions. - Add imports support in
map.areTilesLoaded. - Add support of rotation of elevated raster layers.
- Add support of negative values for
fill-extrusion-flood-light-ground-radiusproperty. - Improve visual cutoff behavior of buildings when using
fill-extrusion-cutoff-fade-rangeproperty.
Bug fixes 🐞
- Fix an issue where
map.flyTowithpaddingoption was setting and overriding map's padding. - Issue a warning instead of a validation error if
urlortilesis missing from source, i.e. in MapTiler source. - Fix the moiré effects on patterns in tilted map views.
- Remove role attribute for non-visible alerts. (h/t @jakubmakielkowski) #13051
- Fix an elevation of symbols above multiple fill extrusions, when some of them hidden or lowered.
- Fix
configexpression chaining through nested styles and other issues related to config scope. - Fix a small callback-related memory leak. (h/t @temas) #13074
- Fix
configandformatexpressions not working together.
3.1.2
Bug fixes 🐞
- Fix attribution not being displayed for imported fragments (reintroducing the fix from v3.0.1 that was accidentally missing in v3.1.0).
3.1.1
Bug fixes 🐞
- Fix
fill-extrusionsnot being displayed in alternative projections. - Fix an issue when WebGL might randomly crash to an unrecoverable state on some mobile devices, specifically Safari on iOS.
3.1.0
Features and improvements ✨
- Improve performance for maps with many textures (such as styles with satellite imagery), fixing excessive memory usage. (h/t @tristan-morris) #12924
- Add
raster-elevationproperty for elevating raster layers to a constant height (e.g. clouds over globe). - Add
raster-emissive-strengthandfill-extrusion-emissive-strengthproperties for controlling 3D lighting on buildings and raster layers. - Add
MapgetConfigPropertymethod for getting current style config values. - Add
configsupport in terrain options. - Improve performance for pitched views with many fill extrusions on higher zoom levels.
- Allow turning off the terrain that is defined in the imports on the root-level Style by setting it to
null. - Allow the partial terrain exaggeration update without specifying the source.
- Respect style schema restrictions (
minValue,maxValue,stepValue,values,type) when evaluating config options.
Bug fixes 🐞
- Fix an issue where
center: [0, 0]andzoom: 0map options were ignored in favor of style settings. - Fix an issue with the camera not taking the short route when animating between locations across the anti-meridian.
- Fix an issue where a style with imports sometimes loaded in incomplete state.
- Fix an issue with rendering styles with nested imports.
- Fix an issue with sources not reloading when changing language and worldview.
- Fix an issue where updating a style fragment URL didn't work correctly.
- Fix an issue when adding a layer with explicit
slotnot taking precedence over thebeforeparameter for layer order. - Fix an issue where updating an image before initial image is loaded produced an error. (h/t @maciejmatu) #12928
- Fix an issue with incorrect collisions for elevated symbols.
- Fix an issue with
"camera-projection": "orthographic"not working in styles with imports. - Fix an issue with tiles sometimes missing in terrain mode on views from a hill down on a valley.
- Fix compact attribution style when using global CSS that sets
box-sizing: border-box. (h/t @simondriesen) #12982 - Remove redundant
aria-labelattribute in attribution control that fails accessibility conformance. (h/t @maggiewachs) #12981 - Disable terrain and hillshade when browser fingerprinting protection (e.g. in private browsing mode) prevents it from rendering correctly.
- Fix layer rendering when import requests are failing.
- Fix map
loadevent not firing for the sources whose tiles are 404s. - Require either
urlortilesfor tiled sources during validation. - Validate for empty layer and source IDs in runtime.
3.0.1
Bug fixes 🐞
- Fix attribution not being displayed for imported fragments.
3.0.0
Mapbox GL JS v3 enables the Mapbox Standard Style, a new realistic 3D lighting system, building shadows and many other visual enhancements, and an ergonomic API for using a new kind of rich, evolving, configurable map styles and seamless integration with custom data. You can get more information about the new features in the Mapbox GL JS v3 migration guide.
Breaking changes ⚠️
- Discontinue WebGL 1 support. WebGL 2 is now mandatory for GL JS v3 usage, aligned with universal browser support.
- Remove the
optimizeForTerrainmap option (layer rendering on globe and terrain is always optimized now).
✨ Features and improvements
- Introduced a new 3D Lights API that supports directional and ambient light sources to give you control of lighting and shadows in your map when using 3D objects.
- Add new
*-emissive-strengthproperties for styling layers with the new lighting API. - Introduced flood lighting for the extruded buildings' walls and the ground beneath them.
- Introduced ambient occlusion to affect the ground beneath the extruded buildings.
- Introduced
measureLightexpression lights configuration property: Create dynamic styles based on lighting conditions. - Added support for shadows cast from fill extrusions.
- Introduced
hslandhslacolor expressions: These expressions allow you to define colors using hue, saturation, and lightness format. - Add support for fading out 3D layers in the distance with
fill-extrusion-cutoff-fade-rangeandmodel-cutoff-fade-rangestyle properties. - Introducing support for nested and configurable styles. You can now import other styles into your main style, with updates to imported styles automatically reflected in your main style. Configuration properties can be set for imported styles, making them customizable.
- Introduced concept of
slots, pre-specified locations in the style, where your layer can be added (e.g., on top of existing land layers but below all labels). - Introduced
configexpression: Retrieves the configuration value for the given option. - When no
styleoption is provided to the Map constructor, the Mapbox Standard Style is now enabled as a default. - Add a
style.import.loadevent to track the loading of imported style fragments. - Improve terrain sampling accuracy.
- Improve zooming and panning over dynamic terrain so that it feels smooth.
- Improve performance for styles that use both hillshade layers and terrain.
- Introduced raster colorization via
raster-colorpaint properties. - Introduced
raster-valueexpression: Returns the raster value of a pixel computed viaraster-color-mix. - Add support for controlling the vertical fog range with
vertical-rangestyle property. - Introduced rounding fill extrusion edges for a smoother appearance.
- Introduced the
icon-image-cross-fadeproperty, which controls the transitioning between the two variants of an icon image. - Introduced
randomexpression: Generate random values using this expression. Use this expression to generate random values, which can be particularly helpful for introducing randomness into your map data. - Introduced
distanceexpression: Returns the shortest distance in meters between the evaluated feature and the input geometry. - Add support for elevating symbols over buildings & other 3D layers with
symbol-z-elevatestyle property. - Improve rendering of stars on globe view.
- Add the
renderstartevent, which, combined with therenderevent, can be used to measure rendering frame duration. - Enable zoom-based expressions for model rotation, scale, and translation.
- Optimize shader compilation to reduce stuttering on complex 3D styles.
- Reduce flickering of symbols along lines due to rounding errors.
Bug fixes 🐞
- Fix the accuracy of the atmosphere gradient when rendering the globe.
- Fix a bug with horizon placement when map
paddingis used. - Fix a bug with horizon rendering on Windows/NVidia.
- Accessibility fixes: remove
tabindexwhen the map is not interactive; removerole="list"from the attribution control; addrole="img"to markers (h/t @kumiko-haraguchi and @aviroopjana). - Fix the order of layers in
queryRenderedFeaturesresults on maps with globe and terrain. - Fix an error when zooming out on certain globe views using the GL JS development bundle.
- Fix an error on
maphasImageandupdateImageafter the map was removed. - Fix rendering of line layers with data-driven
line-border. - Fix an issue with symbols sometimes not rendering correctly over the terrain on a top-down view.
- Remove duplicate frag precision qualifiers
2.15.0
Features ✨ and improvements 🏁
- Improve performance of symbol layers with identical or no text. Eliminate stuttering when zooming on maps with many identical symbols. (#12669)
- Improve performance of clustered sources: 20% faster loading & 40–60% less memory overhead. Improve performance of symbol collisions. (#12682)
- Add
respectPrefersReducedMotionmap option (#12694) - Add the
isPointOnSurfacemap method to determine if the given point is located on a visible map surface. (#12695)
Bug fixes 🐞
- Fix inconsistent spacing in the Scale control (#12644) (h/t kathirgounder)
- Fix tiles preloading when a source is not yet loaded (#12699)
2.14.1
Bug fixes 🐞
- Fix a bug where certain bundling configurations involving Vite or ESBuild could produce a broken build. #12658
2.14.0
Features ✨ and improvements 🏁
- Support
referrerPolicyoption for thetransformRequestfunction when using fetch (#12590) (h/t robertcepa)
Bug fixes 🐞
- Enable anisotropic filtering on tiles beyond 20 degrees pitch to prevent it from compromising image crispness on flat or low-tilted maps. (#12577)
- Fix LngLatBounds.extend() with literal LngLat object. (#12605)
- Add arrow characters to the map of verticalized character (#12608) (h/t kkokkojeong)
- Disable panning inertia if
prefers-reduced-motionis enabled (#12631)
2.13.0
Features ✨ and improvements 🏁
- Improve rendering performance of terrain slightly by reducing its GPU memory footprint. (#12472)
- Add methods for changing a raster tile source dynamically (e.g.
setTiles,setUrl). (#12352)
Bug fixes 🐞
- Fix
line-border-colorwhen used withline-trim-offset(#12461) - Fix potential infinite loop when calling
fitBoundswith globe projection (#12488) - Fix
map.getBounds()returning incorrect bounds with adaptive projections. (#12503) - Introduce skirts for terrain globe mode (#12523)
- Fix blur on draped lines while zoom-in (#12510)
- Fix map pan speed while pinching in (#12543)
- Fix negative-width diacritics handling (#12554)
- Fixes
undefined is not an objectincoalesceChanges(#12497) (h/t nick-romano)
2.12.1
Bug fixes 🐞
- Fix a rare bug where certain diacritical characters could break the rendering of a symbol layer. (#12554)
2.12.0
Features ✨ and improvements 🏁
- Improve performance of patterns and line dashes and improve their appearance when zooming. (#12326)
- Improve performance of text and icon placement. (#12351)
- Improve performance of loading terrain data (#12397)
- Allow zooming towards terrain at a safe distance without pitching the camera (#12354)
- Allow for pitch override in
cameraForBounds,fitBoundsandfitScreenCoordinatescamera APIs. (#12367)
Bug fixes 🐞
- Fix
getBoundswhen used around the poles with a globe projection. (#12315) - Fix incorrect transition flag in
*-patternandline-dasharrayproperties (#12372) - Fix symbols filtering when using
center-to-distancealong with terrain. (#12413) - Fix fog rendering artifact on lower resolution terrain tiles (#12423)
- Fix an issue where Geolocate control would throw an error if it's removed before determining geolocation support (#12332) (h/t tmcw)
2.11.1
Bug fixes 🐞
- Fix support for line breaks in labels that follow line geometries (#12377)
2.11.0
Features ✨ and improvements 🏁
- Add support for
cameraForBoundswith globe projection (#12138) - Add support for
fitBoundsandfitScreenCoordinateswith globe projection (#12211) - Improve support for
getBoundswith globe projection. (#12286) - Improve symbol placement performance with globe projection (#12105)
- Add new marker styling option
occludedOpacityallowing the user to set the opacity of a marker that's behind 3D terrain (h/t jacadzaca) (#12258) - Cancel
ImageSourceimage request when underlying resource is no longer used (#12266) (h/t maciejmatu) - Add object literal support in
LngLatBounds.extend(#12270) (h/t stampyzfanz) - Add live performance counters. Mapbox-gl-js v2.11.0 collects certain performance and feature usage counters so we can better benchmark the library and invest in its performance. The performance counters have been carefully designed so that user-level metrics and identifiers are not collected. (#12343)
Bug fixes 🐞
- Fix elevation of pole geometry when exaggerated terrain is used (#12133)
- Fix
GeolocateControlsometimes not working in iOS16 WebView (#12239) - Fix map crashing on conformal projections at the south pole (#12172)
- Fix pixel flickering between tiles on darker styles in globe view. (#12145)
- Fix occasional missing tiles at bottom of screen during globe-mercator transition (#12137)
- Fix incorrectly requiring three finger drags to change pitch with cooperative gestures while in fullscreen. (#12165)
- Fix jumping when scrolling with mouse when crossing the antimeridian on projections that wrap. (#12238)
- Fix terrain error being fired when using
map.getStyle()with globe view (#12163) - Fix occasional artifacts appearing in the ocean with terrain or globe enabled. (#12279)
- Fix invalid AABB calculation as part of the globe tile cover (#12207)
- Fix incorrect shading of corners in fill extrusions when ambient occlusion is enabled. (#12214)
- Fix potential performance regression on image source updates (#12212)
- Fix memory leak when removing maps (#12224) (h/t joewoodhouse)
- Fix updating marker position when toggling between world copied projections and projections without (#12242)
- Fix missing icons in some styles. (#12299)
- Fix overwriting all feature ids while setting promoteIds on other layers with an object. (#12322) (h/t yongjun21)
- Fix cursor returning to original state after a popup with
trackPointeris removed (#12230) (h/t camouflagedName)
2.10.0
Features ✨ and improvements 🏁
- Add new marker styling option
rotationAlignment: 'horizon'allowing marker rotation to match the curvature of the horizon in globe view. (#11894) - Improve panning precision on Globe View and relax constraints on lower zoom levels. (#12114)
- Add unit option to number-format expression. (#11839) (h/t varna)
- Add screen reader alert for cooperative gestures warning message. (#12058)
- Improve rendering performance on globe view. (#12050)
- Improve tile loading performance on low zoom levels. (#12061)
- Improve globe-mercator transition and map load performance with globe projection. (#12039)
Bug fixes 🐞
- Fix a bug where
idexpression didn't correctly handle a value of 0. (#12000) - Fix precision errors in depth pack/unpack. (#12005)
- Fix
cooperativeGesturespreventing panning on mobile while in fullscreen. (#12058) - Fix misplaced raster tiles after toggling
setStylewith a globe projection. (#12049) - Fix exception on creating map in an iframe with sandbox attribute. (#12101)
- Fix "improve map" link in the attribution to include location even if map hash is disabled. (#12122)
- Fix Chrome console warnings about ignored event cancel on touch interactions. (#12121) (h/t jschaf)
2.9.2
Bug fixes 🐞
- Add a workaround in
ScaleControlto support localization in browsers withoutNumberFormatsupport. (#12068) - Fix
GeolocateControlnot working in Safari. (#12080)
2.9.1
Bug fixes 🐞
- Fix missing lines on some Windows devices. (#12017)
2.9.0
Features ✨
- Add
globeprojection. This new projection displays the map as a 3d globe and can be enabled by either passingprojection: globeto the map constructor or by callingmap.setProjection('globe'). All layers are supported by globe except for Custom Layers and Sky. - Extend atmospheric
fogwith three new style specification properties:high-color,space-colorandstar-intensityto allow the design of atmosphere around the globe and night skies. (#11590) - Add a new line layer paint property in the style specification:
line-trim-offsetthat can be used to create a custom fade out with improved update performance overline-gradient. (#11570) - Add an option for providing a geolocation adapter to
GeolocateControl. (#10400) (h/t behnammodi) - Add
Map.Titleproperty to locale options to localise the maparia-label. (#11549) (h/t andrewharvey) - Allow duplicated coordinates in tile request URLs. (#11441) (h/t ozero)
Bug fixes 🐞
- Fix an issue which causes line layers to occasionally flicker. (#11848)
- Fix markers in fog sometimes becoming more visible when behind terrain. (#11658)
- Fix an issue where setting terrain exageration to 0 could prevent the zoom to be resolved. (#11830)
- Copy stylesheet to allow toggling different styles using setStyle without overwriting some of the properties. (#11942)
2.8.2
Bug fixes 🐞
- Fix an issue where the special bundle for CSP-restricted environments was not compatible with further minification in some bundling setups. (#11790)
2.8.1
Bug fixes 🐞
- Fix the special bundle for CSP-restricted environments that broke in the 2.8.0 release. (#11739)
2.8.0
Performance improvements 🏁
- Improve memory usage by freeing memory more eagerly after loading tiles. (#11434)
- Improve memory usage by reducing repeated line labels on overscaled tiles. (#11414)
- Improve performance when placing many symbols on terrain. (#11466)
Bug fixes 🐞
- Fix
map.fitBounds(),map.fitScreenCoordinates(), andmap.cameraForBounds()incorrectly matching bounds with non-zero bearing. (#11568) (h/t TannerPerrien) - Improve control button appearance by applying
border-radiusmore consistently. (#11423) (h/t nagix) - Fix
ScaleControldisplaying incorrect units with some projections.(#11657) - Fix performance regression when animating image sources. (#11564)
- Fix
MapDataEvent.isSourceLoaded()to check if specific source has loaded. (#11393) - Fix map not wrapping after moving the map with no inertia. (#11448)
- Fix popup not removing event listeners when
closeOnClick:true. (#11540) - Fix camera occasionally intersecting terrain when DEM data loads while zooming. (#11461, #11578)
- Increase clarity of line layers with the terrain on high DPI devices. (#11531)
- Fix canvas size if more than one parent container has a transform CSS property. (#11493)
- Fix error on calling
map.removeImage()on animated image. (#11580) - Fix occasional issue with
fill-extrusionlayers not rendering on tile borders when used with terrain. (#11530)
Workflow 🛠️
- Upgrade Flow from
v0.108.0tov0.142.0and enable type-first mode, greatly improving performance of type-checking. (#11426)
2.7.1
🐞 Bug fixes
- Work around a Safari rendering bug by disabling WebGL context antialiasing for Safari 15.4 and 15.5. (#11615)
- Fix disabling cooperative gesture handling when map is fullscreen in Safari. (#11619)
2.7.0
Features ✨ and improvements 🏁
- Enable preloading tiles for camera animation. (#11328)
- Improve quality of transparent line layers by removing overlapping geometry artifacts. (#11082)
- Add perspective correction for non-rectangular image, canvas and video sources. (#11292)
- Improve performance of default markers. (#11321)
- Add marker methods
setSnapToPixelandgetSnapToPixelto indicate rounding a marker to pixel. (#11167) (h/t malekeym) - Add a default
aria-labelfor interactive markers for improved user accessibility. (#11349) - Add support for sparse tile sets to DEM data sources, when served tiles don't go up to the full
maxzoom. (#11276) - Allow users to set order of custom attribution. (#11196)
- Add function call chaining to function
map.setProjection(#11279) (h/t lpizzinidev)
🐞 Bug fixes
- Fix canvas size to evaluate to expected value when applying the CSS transform property. (#11310)
- Fix
getBoundssometimes returning invalidLngLatwhen zooming on a map with terrain. (#11339) (h/t @ted-piotrowski) - Fix rendering of denormalized strings with diacritics. (#11269)
- Remove redundant title attribute from
Improve this Mapattribution element. (#11360) - Fix a rare terrain flickering issue when using terrain with multiple vector data sources. (#11346)
2.6.1
🐞 Bug fixes
- Remove Object spread syntax to ensure older build systems continue to work as expected. (#11295)
2.6.0
✨ Features and improvements
- Add support for a variety of new map projections beyond the standard Web Mercator. Alternate projections can be used together with all existing styles and sources. The projections eliminate distortion as you zoom to make them useful at every scale. Supported projections include
albers,equalEarth,equirectangular,lambertConformalConic,naturalEarthandwinkelTripel. Change the projection by setting it in the map constructor:new Map({ projection: 'winkelTripel', ... }). (#11124)- Limitations: Non-mercator projections do not yet support terrain, fog, free camera or CustomLayerInterface.
- Add a new
"cooperativeGestures": truemap option that prevents the map from capturing page scrolling and panning. When enabled, scroll zooming requiresctrlor⌘to be pressed and touch panning requires two fingers (#11029, #11116) - Add support for dynamic filtering of symbols based on pitch and distance to map center.
["pitch"]and["distance-from-camera"]expressions can now be used within thefilterof a symbol layer. (#10795) - Improve user accessibility: conveying only
aria-labelin controls, replacearia-pressedwitharia-expandedin the attribution control, interactive markers with popups express anaria-expandedstate, and interactive markers have the role "button". (#11064) - Add support for conditionally styling most paint properties according to the presence or absence of specific images. (#11049)
- Add support for attaching events to multiple layers with
map.on(), allowing users to retrieve features under the mouse or touch event based on the order in which they are rendered. (#11114)(h/t @omerbn)
🐞 Bug fixes
- Fix
map.setFeatureState(...)not updating rendering when terrain is enabled. (#11209) - Fix marker positioning before initial map load (#11025)
- Fix slow tile loading performance on maps with CJK glyphs on certain Chrome/GPU combinations. (#11047)
- Update NavigationControl when
minandmaxzoom are changed (#11018) - Prevent video sources from entering fullscreen on iOS Safari (#11067)
- Fix a rare triangulation issue that could cause an infinite loop (#11110)
- Fix
nullfeature values returned as"null"byqueryRenderedFeatures(...)(#11110) - Fix rendering issue with power of two square images and
'raster-resampling': 'nearest'(#11162)
2.5.1
🐞 Bug fixes
- Fix an iOS 15 issue where the iOS Safari tab bar interrupts touch interactions. (#11084)
2.5.0
Features ✨ and improvements 🏁
- Added
queryRenderedFeaturessupport to heatmap layers. (#10996) - Added support for using
line-gradientandline-dasharraypaint properties together on line layers. (#10894) - Added
preclickevent allowing popups to close and open in a new location on one click. (#10926) - Improved collision detection for labels along lines, slightly improving label density. (#10918)
- Improved Popup
addClassName,removeClassNameandtoggleClassNamemethods to work on popup instances that are not added to the map. (#10889)- ⚠️ Note: Direct modifications to the popup container CSS class no longer persist. These methods should be used instead.
🐞 Bug fixes
- Fixed
maxBoundsproperty not working across the 180th meridian. (#10903) - Fixed
map.getBounds()returning too-large bounds under some conditions. (#10909) - Fixed markers not updating position when toggling terrain. (#10985)
- Fixed gap on edge of map on retina displays. (#10936)
- Fixed SDF images rendering inside text. (#10989)
- Fixed an issue with slow tile loading performance on maps with CJK glyphs on certain Chrome/GPU combinations. (#11047)
2.4.0
✨ Features and improvements
- Add
showUserHeadingoption toGeolocateControlthat draws a triangle in front of the dot to denote both the user's location, and the direction they're facing.(#10817) (h/t to @tsuz) - Add support for
text-writing-modeproperty when usingsymbol-placement: linetext labels. (#10647)- Note: This change will bring the following changes for CJK text blocks:
-
- For vertical CJK text, all the characters including Latin and Numbers will be vertically placed now. Previously, Latin and Numbers were horizontally placed.
-
- For horizontal CJK text, there may be a slight horizontal shift due to the anchor shift.
-
- Note: This change will bring the following changes for CJK text blocks:
- Improve character alignment in labels with mixed CJK and Latin characters by adding support for
descenderandascenderfont metrics.(#8781) - Improve terrain performance by reducing number of framebuffer switches during draping.(#10701)
- Improve behavior of vertically aligned line labels with horizontal text by adding stickiness to their flip state, preventing them from flickering. (#10622)
🐞 Bug fixes
- Fix a potential rendering artifact when using custom
fill-extrusiondataset with terrain. (#10812) - Fix anchor calculation for
line-centerline labels when the anchor is very near to line segment endpoints. (#10776) - Fix
ImageSourcebreaking in Firefox/Safari if it's not immediately visible.(#10698) - Fix gradient skybox rendering issue on some ARM Mali GPU's.(#10703)
2.3.1
🐞 Bug fixes
- Fix fog flickering when the map option
optimizeForTerrainis set to false (#10763) - Fix collision boxes which were not correctly updated for symbols with
text-variable-anchor(#10709)
2.3.0
✨ Features and improvements
- Add configurable fog as a root style specification (#10564)
- Add support for data-driven expressions in
line-dasharrayandline-capproperties. (#10591) - Add support for data-driven
text-line-height(#10612) - Add client-side elevation querying with
map.queryTerrainElevation(lngLat)when terrain is active (#10602) - Reduce GPU memory footprint when terrain is active by sharing a single depth stencil renderbuffer for all draping (#10611)
- Optimize tile cover by preventing unnecessary tile loads when terrain is active (#10467)
- Batch render DOM elements to avoid reflow (#10530, #10567) (h/t zarov)
🐞 Bug fixes
- Fix style property transitions not invalidating the terrain render cache (#10485)
- Fix raster tile expiry data not being retained. (#10494) (h/t andycalder)
- Fix undefined type error when removing
line-gradientpaint property (#10557) - Fix unclustered points in a clustered GeoJSON source incorrectly snapping to a grid at high zoom levels. (#10523)
- Fix
map.loadImagefollowed with a delay bymap.addImagefailing in Safari and Firefox. (#10524) - Allow conditional display of formatted images in text (#10553)
- Fix fill-extrusion elevation underflow below sea level (#10570)
- Fix dashed lines with square line caps. (#9561)
- Fix markers sometimes throwing an error after being removed from a 3D map. (#10478) (h/t andycalder)
- Set
type=buttonon attribution button to prevent accidental form submit when map is nested in<form>(#10531) - Fix nine documentation typos (#10546, #10548 #10551 #10646) (h/t coliff)
2.2.0
Features and improvements
- Add
testModeMap option that silences errors and warnings generated due to an invalid accessToken. It maybe useful when using the library to write unit tests. (#10445) - Improve
geojsonSource.setData(...)performance in Safari (#10417) - Add
map.getTerrain()method (#10413) - Add
showTerrainWireframemap debug option for displaying terrain wireframe (#10406) - Document the default limit and offset of
geojsonSource.getClusterLeaves(...)(#10403) (h/t henk23) - (Development) Update dev environment to native ES modules to support Node 14+ (#10367)
Bug fixes
- Fix
map.getBounds()to return the inset bounds when map padding is set (#10386) - Support flat roofs for fill-extrusions when using custom data sources with terrain (#10347)
- Fix flickering accuracy circle in
GeolocateControl. (#10334) (h/t anderswi) - Show Mapbox logo if no style is provided for the map (#10361)
- Switch to using alphabetic baseline for locally-rendered glyphs to avoid misalignment on fonts with large ascenders/descenders. (#10390)
- Fix incorrect diffing of styles when using raster DEM tile sources (#10418)
- Fix
queryRenderedFeatures(...)for fill-extrusions partly behind the camera (#10428) - Fix artifacts caused by negative terrain elevation (#10432)
- Reset WebGL culling state before drawing custom layers (#10412)
- Fix DOM event coordinates for scaled containers (#10096) (h/t kawsndriy)
- Fix
collectResourceTimingerrors (#10321)
2.1.1
🐞 Bug fixes
- Fixed a font glyphs performance regression on Firefox. (10363)
2.1.0
✨ Features and improvements
- Added
localFontFamilymap option that enables local generation of all font glyphs. (#10298) - Introduced high resolution local glyph generation for improved rendering quality of glyphs generated using
localIdeographFontFamilyorlocalFontFamilyoptions. (#10298) - Added
optimizeForTerrainmap option allowing to use terrain in layer draw-order or performance priority mode. This fixes terrain not always preserving layer draw-order during animations by making the behavior explicit. (#10258) - Improved performance by slightly shifting the horizon down, reducing the number of tiles loaded for highly-pitched maps. (#10304)
- Improved
evented.once(eventName)to return a promise if no listener function is provided, which allows usingasync/awaitwith map events for a simpler and more readable code. (#10203)
🐞 Bug fixes
- Fixed querying of
fill-extrusions when terrain is enabled. (#10293) - Fixed a bug where close points were sometimes not clustered on higher zoom levels given a small clustering radius. Fixed
clusterMaxZoomso that it is not capped by the sourcemaxzoom. (#10300) - Fixed blurry map-aligned labels on highly pitched maps with terrain. (#10296)
- Fixed a race condition when evaluating image expressions by ensuring sprite has loaded before parsing tiles. (#10294)
- Fixed a bug with fullscreen
fill-extrusionquerying at low pitch. (#10315) - Fixed a regression with the usage of patterns with data-driven styling. (#10284)
- Ensure
evented.listensreturnsfalsewhen no listener is available. (#10281)
2.0.1
✨ Features and improvements
- Added support for using third-party worker-loader plugins in build systems such as Webpack and Rollup (
mapboxgl.workerClass). (#10219) - Added
mapboxgl.setNowandmapboxgl.restoreNowmethods which allow setting custom animation timing for 60 fps, jank-free video recording. (#10172) - Removed outdated CSS hacks that no longer apply. (#10202)
🐞 Bug fixes
- Fixed a bug where
ImageSourceand dynamically loaded icons didn't work in some cases in Firefox and Safari. (#10230) - Fixed a bug where
map.unprojectandmap.panByacted unpredictably in certain cases. (#10224) - Fixed a bug where the sky layer didn't take map padding into account. (#10201)
- Fixed a bug where
map.setStylecouldn't be used to enable terrain. (#10177) - Fixed a bug where mouse events didn't properly fire during zoom scrolling. (#10171)
2.0.0
⚠️ Breaking changes
- mapbox-gl-js is no longer under the 3-Clause BSD license. By upgrading to this release, you are agreeing to Mapbox terms of service. Refer to LICENSE.txt for the new licensing terms and details. For questions, contact our team at https://support.mapbox.com.
- Beginning with v2.0.0, a billable map load occurs whenever a Map object is initialized. Before updating an existing implementation from v1.x.x to v2.x.x, please review the pricing documentation to estimate expected costs.
- Deprecate Internet Explorer 11, no longer supported from this release. (#8283, #6391)
- Support for unlocked pitch up to 85°. The default
maxPitchis increased from 60° to 85° which can result in viewing above the horizon line. By default, this area will be drawn transparent but a new sky layer can be added to the map in order to fill this space. The legacy behavior can be achieved by simply addingmaxPitch: 60to the map options when instantiating your map.
✨ Features and improvements
- Add 3D terrain feature. All layer types and markers can now be extruded using the new
terrainroot level style-spec property or with the functionmap.setTerrain(). (#1489) - Add support for unlocked pitch up to 85° (previously 60°). (#3731)
- Add a new sky layer acting as an infinite background above the horizon line. This layer can be used from the style-spec and has two types:
atmosphericandgradient. - Add a free form camera API, allowing for more complex camera manipulation in 3D, accessible using
map.getFreeCameraOptions()andmap.setFreeCameraOptions(). - Improve performance by adopting a two-phase tile loading strategy, prioritizing rendering of non-symbol layers first.
- Improve performance by avoiding parsing vector tiles that were already aborted.
- Improve performance by adopting a preemptive shader compilation strategy. (#9384)
- Improve performance by disabling fade-in animation for symbols and raster tiles on initial map load.
- Improve performance by defaulting to 2 workers on all platforms. (#3153)
- Improve performance by loading tiles on the main thread at initial map load.
- Improve performance by using better worker task scheduling.
🐞 Bug fixes
- Avoid reloading
rasterandraster-demtiles when the RTLTextPlugin loads. - Add runtime evaluation of label collision boxes for more accurate symbol placement at fractional zoom levels and tilted views.
- Fix tile cache size for terrain DEM sources.
- Prevent holding on to DEM memory on the worker.
- Reduce memory used by
fill-extrusions.
🛠️ Workflow
- Run render tests in browser.
1.13.2
🐞 Bug fixes
- Backports a fix for an iOS 15 issue where the iOS Safari tab bar interrupts touch interactions. (#11084)
1.13.0
✨ Features and improvements
- Improve accessibility by fixing issues reported by WCAG 2.1. #9991
- Improve accessibility when opening a popup by immediately focusing on the content. #9774 (h/t @watofundefined)
- Improve rendering performance of symbols with
symbol-sort-key. #9751 (h/t @osvodef) - Add
MarkerclickToleranceoption. #9640 (h/t @ChristopherChudzicki) - Add
MaphasControlmethod. #10035 - Add
PopupsetOffsetmethod. #9946 (h/t @jutaz) - Add
KeyboardHandlerdisableRotationandenableRotationmethods. #10072 (h/t @jmbott)
🐞 Bug fixes
- Fix a bug where
queryRenderedFeaturesdidn't properly expose the paint values if they were data-driven. #10074 (h/t @osvodef) - Fix a bug where attribution didn't update when layer visibility changed during zooming. #9943
- Fix a bug where hash control conflicted with external history manipulation (e.g. in single-page apps). #9960 (h/t @raegen)
- Fix a bug where
fitBoundshad an unexpected result with non-zero bearing and uneven padding. #9821 (h/t @allison-strandberg) - Fix HTTP support when running GL JS against Mapbox Atlas. #10090
- Fix a bug where the
withinexpression didn't work inquerySourceFeatures. #9933 - Fix a bug where
Popupcontent HTML element was removed onsetDOMContent. #10036 - Fix a compatibility bug when
icon-imageis used as a legacy categorical function. #10060 - Reduce rapid memory growth in Safari by ensuring
ImagedataURI's are released. #10118
⚠️ Note on IE11
We intend to remove support for Internet Explorer 11 in a future release of GL JS later this year.
1.12.0
✨ Features and improvements
- Add methods for changing a vector tile source dynamically (e.g.
setTiles,setUrl). #8048 (h/t @stepankuzmin) - Add a
filteroption for GeoJSON sources to filter out features prior to processing (e.g. before clustering). #9864 - Vastly increase precision of
line-gradientfor long lines. #9694 - Improve
raster-demsources to properly support themaxzoomoption and overzooming. #9789 (h/t @brendan-ward)
🐞 Bug fixes
- Fix a bug where bearing snap interfered with
easeToandflyToanimations, freezing the map. #9884 (h/t @andycalder) - Fix a bug where a fallback image was not used if it was added via
addImage. #9911 (h/t @francois2metz) - Fix a bug where
promoteIdoption failed for fill extrusions with defined feature ids. #9863
🛠️ Workflow
- Renamed the default development branch from
mastertomain.
1.11.1
🐞 Bug fixes
- Fix a bug that caused
map.loaded()to incorrectly returnfalseafter a click event. (#9825)
1.11.0
✨ Features and improvements
- Add an option to scale the default
Markericon.(#9414) (h/t adrianababakanian) - Improving the shader compilation speed by manually getting the run-time attributes and uniforms.(#9497)
- Added
clusterMinPointsoption for clustered GeoJSON sources that defines the minimum number of points to form a cluster.(#9748)
🐞 Bug fixes
- Fix a bug where map got stuck in a DragRotate interaction if it's mouseup occurred outside of the browser window or iframe.(#9512)
- Fix potential visual regression for
*-patternproperties on AMD graphics card vendor.(#9681) - Fix zooming with a double tap on iOS Safari 13.(#9757)
- Removed a misleading
geometry exceeds allowed extentwarning when using Mapbox Streets vector tiles.(#9753) - Fix reference error when requiring the browser bundle in Node. (#9749)
1.10.2
🐞 Bug fixes
- Fix zooming with a double tap in iOS Safari 13.(#9757)
1.10.1
🐞 Bug fixes
- Fix markers interrupting touch gestures (#9675, fixed by #9683)
- Fix bug where
map.isMoving()returned true while map was not moving (#9647, fixed by #9679) - Fix regression that prevented
touchmoveevents from firing during gestures (#9676, fixed by #9685) - Fix
imageexpression evaluation which was broken under certain conditions (#9630, fixed by #9685) - Fix nested
withinexpressions in filters not evaluating correctly (#9605, fixed by #9611) - Fix potential
undefinedpaint variable inStyleLayer(#9688) (h/t mannnick24)
1.10.0
✨ Features
- Add
mapboxgl.prewarm()andmapboxgl.clearPrewarmedResources()methods to allow developers to optimize load times for their maps (#9391) - Add
index-ofandsliceexpressions 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) - Correctly set RTL text plugin status if the plugin URL could not be loaded. This allows developers to add retry logic on network errors when loading the plugin (#9489)
🍏 Gestures
This release significantly refactors and improves gesture handling on desktop and mobile. Three new touch gestures have been added: two-finger swipe to adjust pitch, two-finger double tap to zoom out, and tap then drag to adjust zoom with one finger (#9365). In addition, this release brings the following changes and bug fixes:
- It's now possible to interact with multiple maps on the same page at the same time (#9365)
- Fix map jump when releasing one finger after pinch zoom (#9136)
- Stop mousedown and touchstart from interrupting
easeToanimations when interaction handlers are disabled (#8725) - Stop mouse wheel from interrupting animations when
map.scrollZoomis disabled (#9230) - A camera change can no longer be prevented by disabling the interaction handler within the camera change event. Selectively prevent camera changes by listening to the
mousedownortouchstartmap event and calling .preventDefault() (#9365) - Undocumented properties on the camera change events fired by the doubleClickZoom handler have been removed (#9365)
🐞 Improvements and bug fixes
- Line labels now have improved collision detection, with greater precision in placement, reduced memory footprint, better placement under pitched camera orientations (#9219)
- Fix
GlyphManagercontinually re-requesting missing glyph ranges (#8027, fixed by #9375) (h/t oterral) - Avoid throwing errors when calling certain popup methods before the popup element is created (#9433)
- Fix a bug where fill-extrusion features with colinear points were not returned by
map.queryRenderedFeatures(...)(#9454) - Fix a bug where using feature state on a large input could cause a stack overflow error (#9463)
- Fix exception when using
background-patternwith data driven expressions (#9518, fixed by #9520) - Fix a bug where UI popups were potentially leaking event listeners (#9498) (h/t mbell697)
- Fix a bug where the
withinexpression would return inconsistent values for points on tile boundaries (#9411, #9428) - Fix a bug where the
withinexpression would incorrectly evaluate geometries that cross the antimeridian (#9440) - Fix possible undefined exception on paint variable of style layer (#9437) (h/t mannnick24)
- Upgrade minimist to ^1.2.5 to get fix for security issue CVE-2020-7598 upstream (#9425, fixed by #9425) (h/t watson)
1.9.1
🐞 Bug fixes
- Fix a bug #9477 in
Map#fitBounds(..)wherein thepaddingpassed to options would get applied twice. - Fix rendering bug #9479 caused when data-driven
*-patternproperties reference images added withMap#addImage(..). - Fix a bug #9468 in which an exception would get thrown when updating symbol layer paint property using
setPaintProperty.
1.9.0
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
withinexpression 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
withinexpression:
"icon-opacity": ["case", ["==", ["within", "some-polygon"], true], 1, ["==", ["within", "some-polygon"], false], 0]
- Map API functions such as
easeToandflyTonow supportpadding: PaddingOptionswhich lets developers shift a map's center of perspective when building floating sidebars (#8638)
🍏 Improvements
- Results from
queryRenderedFeaturesnow have evaluated property values rather than raw expressions (#9198) - Improve scaling of patterns used in
line-patternon all device resolutions and pixel ratios (#9266) - Slightly improve GPU memory footprint (#9377)
LngLatBounds.extendis more flexible because it now accepts objects withlatandlonproperties as well as arrays of coordinates (#9293)- Reduce bundle size and improve visual quality of
showTileBoundariesdebug 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
inexpression to be false (#9295) - Fix exception thrown when trying to set
feature-statefor 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-arrayof empty length (#9385) - Fix a bug where
icon-imageexpression that evaluates to an empty string ('') produced a warning (#9380) - Fix a bug where certain
popupmethods threw errors when accessing the container element before it was created, fixes #9429(#9433)
1.8.1
- Fixed a bug where all labels showed up on a diagonal line on Windows when using an integrated Intel GPU from the Haswell generation (#9327, fixed by reverting #9229)
1.8.0
✨ Features and improvements
- Reduce size of line atlas by removing unused channels (#9232)
- Prevent empty buffers from being created for debug data when unused (#9237)
- Add space between distance and unit in scale control (#9276) (h/t gely) and (#9284) (h/t pakastin)
- Add a
showAccuracyCircleoption to GeolocateControl that shows the accuracy of the user's location as a transparent circle. Mapbox GL JS will show this circle by default. (#9253) (h/t Meekohi) - Implemented a new tile coverage algorithm to enable level-of-detail support in a future release (#8975)
🐞 Bug fixes
line-dasharrayis now ignored correctly whenline-patternis set (#9189)- Fix line distances breaking gradient across tile boundaries (#9220)
- Fix a bug where lines with duplicate endpoints could disappear at zoom 18+ (#9218)
- Fix a bug where Ctrl-click to drag rotate the map was disabled if the Alt, Cmd or Windows key is also pressed (#9203)
- Pass errors to
getClusterExpansionZoom,getClusterChildren, andgetClusterLeavescallbacks (#9251) - Fix a rendering performance regression (#9261)
- Fix visual artifact for
line-dasharray(#9246) - Fixed a bug in the GeolocateControl which resulted in an error when
trackUserLocationwasfalseand the control was removed before the Geolocation API had returned a location (#9291) - Fix
promoteIdfor line layers (#9210) - Improve accuracy of distance calculations (#9202) (h/t Meekohi)
1.7.0
✨ Features
- Add
promoteIdoption to use a feature property as ID for feature state (#8987) - Add a new constructor option to
mapboxgl.Popup,closeOnMove, that closes the popup when the map's position changes (#9163) - Allow creating a map without a style (an empty one will be created automatically) ( h/t @stepankuzmin ) (#8924)
map.once()now allows specifying a layer id as a third parameter making it consistent withmap.on()(#8875)
🍏 Improvements
- Improve performance of raster layers on large screens (#9050)
- Improve performance for hillshade and raster layers by implementing a progressive enhancement that utilizes
ImageBitmapandOffscreenCanvas(#8845) - Improve performance for raster tile rendering by using the stencil buffer (#9012)
- Update
symbol-avoid-edgesdocumentation to acknowledge the existence of global collision detection (#9157) - Remove reference to
infunction which has been replaced by theinexpression (#9102)
🐞 Bug Fixes
- Change the type of tile id key to string to prevent hash collisions (#8979)
- Prevent changing bearing via URL hash when rotation is disabled (#9156)
- Fix URL hash with no bearing causing map to fail to load (#9170)
- Fix bug in
GeolocateControlwhere multiple instances of the control on one page may result in the user location not being updated (#9092) - Fix query
fill-extrusionsmade from polygons with coincident points and polygons with less than four points (#9138) - Fix bug where
symbol-sort-keywas not used for collisions that crossed tile boundaries (#9054) - Fix bug in
DragRotateHandler._onMouseUpgetting stuck in drag/rotate (#9137) - Fix "Click on Compass" on some mobile devices (add
clickTolerancetoDragRotateHandler) (#9015) (h/t Yanonix)
1.6.1
🐞 Bug Fixes
- Fix style validation error messages not being displayed (#9073)
- Fix deferred loading of rtl-text-plugin not working for labels created from GeoJSON sources (#9091)
- Fix RTL text not being rendered with the rtl-text-plugin on pages that don't allow
script-src: blob:in their CSP.(#9122)
1.6.0
✨ Features
- Add ability to insert images into text labels using an
imageexpression within aformatexpression:"text-field": ["format", "Some text", ["image", "my-image"], "some more text"](#8904) - Add support for stretchable images (aka nine-part or nine-patch images). Stretchable images can be used with
icon-text-fitto draw resized images with unstretched corners and borders. (#8997) - Add
inexpression. 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
minPitchandmaxPitchmap options (#8834) - Add
rotation,rotationAlignmentandpitchAlignmentoptions to markers (#8836) (h/t dburnsii) - Add methods to Popup to manipulate container class names (#8759) (h/t Ashot-KR)
- Add configurable inertia settings for panning (h/t @aMoniker) (#8887)
- Add ability to localize UI controls (#8095) (h/t dmytro-gokun)
- Add LatLngBounds.contains() method (#7512, fixed by #8200)
- Add option to load rtl-text-plugin lazily (#8865)
- Add
essentialparameter to AnimationOptions that can overrideprefers-reduced-motion: reduce(#8743, fixed by #8883)
🍏 Improvements
- Allow rendering full world smaller than 512px. To restore the previous limit call
map.setMinZoom(0)(#9028) - Add an es modules build for mapbox-gl-style-spec in dist/ (#8247) (h/t ahocevar)
- Add 'image/webp,/' accept header to fetch/ajax image requests when webp supported (#8262)
- Improve documentation for setStyle, getStyle, and isStyleLoaded (#8807)
🐞 Bug Fixes
- Fix map rendering after addImage and removeImage are used to change a used image (#9016)
- Fix visibility of controls in High Contrast mode in IE (#8874)
- Fix customizable url hash string in IE 11 (#8990) (h/t pakastin)
- Allow expression stops up to zoom 24 instead of 22 (#8908) (h/t nicholas-l)
- Fix alignment of lines in really overscaled tiles (#9024)
- Fix
Failed to execute 'shaderSource' on 'WebGLRenderingContext'errors (#9017) - Make expression validation fail on NaN (#8615)
- Fix setLayerZoomRange bug that caused tiles to be re-requested (#7865, fixed by #8854)
- Fix
map.showTileBoundariesrendering (#7314) - Fix using
generateIdin conjunction withclusterin a GeoJSONSource (#8223, fixed by #8945) - Fix opening popup on a marker from keyboard (#6835)
- Fix error thrown when request aborted (#7614, fixed by #9021)
- Fix attribution control when repeatedly removing and adding it (#9052)
1.5.1
This patch introduces two workarounds that address longstanding issues related to unbounded memory growth in Safari, including #8771 and #4695. We’ve identified two memory leaks in Safari: one in the CacheStorage API, addressed by #8956, and one in transferring data between web workers through Transferables, addressed by #9003.
🍏 Improvements
- Implement workaround for memory leak in Safari when using the
CacheStorageAPI. ( #8856) - Implement workaround for memory leak in Safari when using
Transferableobjects to transferArrayBuffersto WebWorkers. If GL-JS detetcts that it is running in Safari, the use ofTransferablesto transfer data to WebWorkers is disabled. ( #9003) - Improve animation performance when using
map.setData. (#8913) (h/t msbarry)
1.5.0
✨ Features
- Add disabled icon to GeolocateControl if user denies geolocation permission. #8871)
- Add
outofmaxboundsevent to GeolocateControl, which is emitted when the user is outside ofmap.maxBounds(#8756) (h/t MoradiDavijani) - Add
mapboxgl.getRTLTextPluginStatus()to query the current status of thertl-text-pluginto make it easier to allow clearing the plugin when necessary. (ref. #7869) (#8864) - Allow
hashMap option to be set as a string, which sets the map hash in the url to a custom query parameter. (#8603) (h/t SebCorbin)
🍏 Improvements
- Fade symbols faster when zooming out quickly, reducing overlap. (#8628)
- Reduce memory usage for vector tiles that contain long strings in feature properties. ( #8863)
🐞 Bug Fixes
- Fix
text-variable-anchornot trying multiple placements during collision with icons whenicon-text-fitis enabled. (#8803) - Fix
icon-text-fitnot properly respecting vertical labels. (#8835) - Fix opacity interpolation for composition expressions. (#8818)
- Fix rotate and pitch events being fired at the same time. (#8872)
- Fix memory leaks that occured during tile loading and map removal.(#8813 and #8850)
- Fix web-worker transfer of
ArrayBuffersin environments whereinstanceof ArrayBufferfails.(e.gcypress) (#8868)
1.4.1
🐞 Bug Fixes
- Fix the way that
coalescehandles theimageoperator so available images are rendered properly (#8839) - Do not emit the
styleimagemissingevent for an empty string value (#8840) - Fix serialization of
ResolvedImagetype so*-patternproperties work properly (#8833)
1.4.0
✨ Features
- Add
imageexpression operator to determine image availability (#8684) - Enable
text-offsetwith variable label placement (#8642)
🍏 Improvements
- Faster loading and better look of raster terrain (#8694)
- Improved code documentation around resizing and {get/set}RenderedWorldCopies and more (#8748, #8754)
- Improve single vs. multi-touch zoom & pan interaction (#7196) (#8100)
🐞 Bug fixes
- Fix rendering of
collisionBoxwhentext-translateoricon-translateis enabled (#8659) - Fix
TypeErrorwhen reloading a source and immediately removing the map (#8711) - Adding tooltip to the geolocation control button (#8735) (h/t BAByrne)
- Add
originalEventproperty to NavigationControl events (#8693) (h/t stepankuzmin) - Don't cancel follow mode in the GeolocateControl when resizing the map or rotating the screen (#8736)
- Fix error when calling
Popup#trackPointerbefore setting its content or location (#8757) (h/t zxwandrew) - Respect newline characters when text-max-width is set to zero (#8706)
- Update earcut to v2.2.0 to fix polygon tesselation errors (#8772)
- Fix icon-fit with variable label placement (#8755)
- Icons stretched with
icon-text-fitare now sized correctly (#8741) - Collision detection for icons with
icon-text-fitnow works correctly (#8741)
1.3.2
- Fix a SecurityError in Firefox >= 69 when accessing the cache #8780
1.3.1
🐞 Bug Fixes
- Fix a race condition that produced an error when a map was removed while reloading a source. #8711
- Fix a race condition were
renderevent was sometimes not fired afterloadevent in IE11. #8708
1.3.0
🍏 Features
- Introduce
text-writing-modesymbol layer property to allow placing point labels vertically. #8399 - Extend variable text placement to work when
text/icon-allow-overlapis set totrue. #8620 - Allow
text-colorto be used in formatted expressions to be able to draw different parts of a label in different colors. #8068
✨ Improvements
- Improve tile loading logic to cancel requests more aggressively, improving performance when zooming or panning quickly. #8633
- Display outline on control buttons when focused (e.g. with a tab key) for better accessibility. #8520
- Improve the shape of line round joins. #8275
- Improve performance of processing line layers. #8303
- Improve legibility of info displayed with
map.showTileBoundaries = true. #8380 (h/t @andrewharvey) - Add
MercatorCoordinate.meterInMercatorCoordinateUnitsmethod to make it easier to convert from meter units to coordinate values used in custom layers. #8524 (h/t @andrewharvey) - Improve conversion of legacy filters with duplicate values. #8542
- Move out documentation & examples website source to a separate
mapbox-gl-js-docsrepo. #8582
🐞 Bug Fixes
- Fix a bug where local CJK fonts would switch to server-generated ones in overzoomed tiles. #8657
- Fix precision issues in deck.gl-powered custom layers. #8502
- Fix a bug where fill and line layers wouldn't render correctly over fill extrusions when coming from the same source. #8661
- Fix map loading for documents loaded from Blob URLs. #8612
- Fix classification of relative file:// URLs when in documents loaded from a file URL. #8612
- Remove
esmfrom packagedependencies(so that it's not installed onnpm install mapbox-gl). #8586 (h/t @DatGreekChick)
1.2.1
🐞 Bug fixes
- Fix bug in
NavigationControlcompass button that prevented it from rotating with the map (#8605)
1.2.0
Features and improvements
- Add
*-sort-keylayout property for circle, fill, and line layers, to dictate which features appear above others within a single layer(#8467) - Add ability to instantiate maps with specific access tokens (#8364)
- Accommodate
prefers-reduced-motionsettings in browser (#8494) - Add Map
visualizePitchoption that tilts the compass as the map pitches (#8208, fixed by #8296) (h/t pakastin) - Make source options take precedence over TileJSON (#8232) (h/t jingsam)
- Make requirements for text offset properties more precise (#8418)
- Expose
convertFilterAPI in the style specification (#8493
Bug fixes
- Fix changes to
text-variable-anchor, such that previous anchor positions would take precedence only if they are present in the updated array (considered a bug fix, but is technically a breaking change from previous behavior) (#8473) - Fix rendering of opaque pass layers over heatmap and fill-extrusion layers (#8440)
- Fix rendering of extraneous vertical line in vector tiles (#8477, fixed by #8479)
- Turn off 'move' event listeners when removing a marker (#8465)
- Fix class toggling on navigation control for IE (#8495) (h/t cs09g)
- Fix background rotation hovering on geolocate control (#8367) (h/t GuillaumeGomez)
- Fix error in click events on markers where
startPosis not defined (#8462) (h/t @msbarry) - Fix malformed urls when using custom
baseAPIURLof a certain form (#8466)
1.1.1
🐞 Bug fixes
- Fix unbounded memory growth caused by failure to cancel requests to the cache (#8472)
- Fix unbounded memory growth caused by failure to cancel requests in IE (#8481)
- Fix performance of getting tiles from the cache (#8489)
1.1.0
✨ Minor features and improvements
- Improve line rendering performance by using a more compact line attributes layout (#8306)
- Improve data-driven symbol layers rendering performance (#8295)
- Add the ability to disable validation during
queryRenderedFeaturesandquerySourceFeaturescalls, as a performance optimization (#8211) (h/t gorshkov-leonid) - Improve
setFilterperformance by caching keys ingroupByLayoutroutine (#8122) (h/t vallendm) - Improve rendering of symbol layers with
symbol-z-order: viewport-y, when icons are allowed to overlap but not text (#8180) - Prefer breaking lines at a zero width space to allow better break point suggestions for Japanese labels (#8255)
- Add a
WebGLRenderingContextargument toonRemovefunction ofCustomLayerInterface, to allow direct cleanup of related context (#8156) (h/t ogiermaitre) - Allow zoom speed customization by adding
setZoomRateandsetWheelZoomRatemethods toScrollZoomHandler(#7863) (h/t sf31) - Add
trackPointermethod toPopupAPI that continuously repositions the popup to the mouse cursor when the cursor is within the map (#7786) - Add
getElementmethod toPopupto retrieve the popup's HTML element (#8123) (h/t bravecow) - Add
fill-patternexample to the documentation (#8022) (h/t flawyte) - Update script detection for Unicode 12.1 (#8158)
- Add
nofollowto Mapbox logo & "Improve this map" links (#8106) (h/t viniciuskneves) - Include source name in invalid GeoJSON error (#8113) (h/t Zirak)
🐞 Bug fixes
- Fix
updateImagenot working as expected in Chrome (#8199) - Fix issues with double-tap zoom on touch devices (#8086)
- Fix duplication of
movestartevents when zooming (#8259) (h/t bambielli-flex) - Fix validation of
"format"expression failing when options are provided (#8339) - Fix
setPaintPropertynot working online-patternproperty (#8289) - Fix the GL context being left in unpredictable states when using custom layers (#8132)
- Fix unnecessary updates to attribution control string (#8082) (h/t poletani)
- Fix bugs in
findStopLessThanOrEqualToalgorithm (#8134) (h/t Mike96Angelo) - Fix map not displaying properly when inside an element with
text-align: center(#8227) (h/t mc100s) - Clarify in documentation that
Popup#maxWidthaccepts allmax-widthCSS values (#8312) (h/t viniciuskneves) - Fix location dot shadow not displaying (#8119) (h/t bravecow)
- Fix docs dev dependencies being mistakenly installed as package dependencies (#8121) (h/t bravecow)
- Various typo fixes (#8230, h/t erictheise) (#8236, h/t fredj)
- Fix geolocate button CSS (#8367, h/t GuillaumeGomez)
- Fix caching for Mapbox tiles (#8389)
1.0.0
⚠️ Breaking changes
This release replaces the existing “map views” pricing model in favor of a “map load” model. Learn more in a recent blog post about these changes.
By upgrading to this release, you are opting in to the new map loads pricing.
Why is this change being made?
This change allows us to implement a more standardized and predictable method of billing GL JS map usage. You’ll be charged whenever your website or web application loads, not by when users pan and zoom around the map, incentivizing developers to create highly interactive map experiences. The new pricing structure also creates a significantly larger free tier to help developers get started building their applications with Mapbox tools while pay-as-you-go pricing and automatic volume discounts help your application scale with Mapbox. Session billing also aligns invoices with metrics web developers already track and makes it easier to compare usage with other mapping providers.
What is changing?
- Add SKU token to Mapbox API requests #8276
When (and only when) loading tiles from a Mapbox API with a Mapbox access token set (mapboxgl.accessToken), a query parameter named sku will be added to all requests for vector, raster and raster-dem tiles. Every map instance uses a unique sku value, which is refreshed every 12 hours. The token itself is comprised of a token version (always “1”), a sku ID (always “01”) and a random 10-digit base-62 number. The purpose of the token is to allow for metering of map sessions on the server-side. A session lasts from a new map instantiation until the map is destroyed or 12 hours passes, whichever comes first.
For further information on the pricing changes, you can read our blog post and check out our new pricing page, which has a price calculator. As always, you can also contact our team at https://support.mapbox.com.
0.54.1
Bug fixes
- Fix unbounded memory growth caused by failure to cancel requests in IE (#8481)
0.54.0
Breaking changes
- Turned
localIdeographFontFamilymap option on by default. This may change how CJK labels are rendered, but dramatically improves performance of CJK maps (because the browser no longer needs to download heavy amounts of font data from the server). AddlocalIdeographFontFamily: falseto turn this off. #8008 - Added
PopupmaxWidthoption, set to"240px"by default. #7906
Major features
- Added support for updating and animating style images. #7999
- Added support for generating style images dynamically (e.g. for drawing icons based on feature properties). #7987
- Added antialiasing support for custom layers. #7821
- Added a new
mapbox-gl-csp.jsbundle for strict CSP environments whereworker-src: blobis disallowed. #8044
Minor features and improvements
- Improved performance of fill extrusions. #7821
- Improved performance of symbol layers. #7967
- Slightly improved rendering performance in general. #7969
- Slightly improved performance of HTML markers. #8018
- Improved diffing of styles with
"visibility": "visible". #8005 - Improved zoom buttons to grey out when reaching min/max zoom. #8023
- Added a title to fullscreen control button. #8012
- Added
rel="noopener"attributes to links that lead to external websites (such as Mapbox logo and OpenStreetMap edit link) for improved security. #7914 - Added tile size info when
map.showTileBoundariesis turned on. #7963 - Significantly improved load times of the benchmark suite. #8066
- Improved behavior of
canvasSource.pauseto be more reliable and able to render a single frame. #8130
Bug fixes
- Fixed a bug in Mac Safari 12+ where controls would disappear until you interact with the map. 8193
- Fixed a memory leak when calling
source.setData(url)many times. #8035 - Fixed a bug where marker lost focus when dragging. #7799
- Fixed a bug where
map.getCenter()returned a reference to an internalLngLatobject instead of cloning it, leading to potential mutability bugs. #7922 - Fixed a bug where default HTML marker positioning was slightly off. #8074
- Fixed a bug where adding a fill extrusion layer for non-polygon layers would lead to visual artifacts. #7685
- Fixed intermittent Flow failures on CI. #8061
- Fixed a bug where calling
Map#removeFeatureStatedoes not remove the state from some tile zooms #8087 - Fixed a bug where
removeFeatureStatedidn't work on features withidequal to0. #8150 (h/t jutaz)
0.53.1
Bug fixes
- Turn off telemetry for Mapbox Atlas (#7945)
- Fix order of 3D features in query results (fix #7883) (#7953)
- Fix RemovePaintState benchmarks (#7930)
0.53.0
Features and improvements
- Enable
fill-extrusionquerying with ray picking (#7499) - Add
clusterPropertiesoption for aggregated cluster properties (#2412, fixed by #7584) - Allow initial map bounds to be adjusted with
fitBoundsoptions. (#7681) (h/t elyobo) - Remove popups on
Map#remove(#7749) (h/t andycalder) - Add
Map#removeFeatureState(#7761) - Add
number-formatexpression (#7626) - Add
symbol-sort-keystyle property (#7678)
Bug fixes
- Upgrades Earcut to fix a rare bug in rendering polygons that contain a coincident chain of holes (#7806, fixed by #7878)
- Allow
file://protocol in XHR requests for Cordova/Ionic/etc (#7818) - Correctly handle WebP images in Edge 18 (#7687)
- Fix bug which mistakenly requested WebP images in browsers that do not support WebP (#7817) (#7819)
- Fix images not being aborted when dequeued (#7655)
- Fix DEM layer memory leak (#7690, fixed by #7691)
- Set correct color state before rendering custom layer (#7711)
- Set
LngLat.toBounds()default radius to 0 (#7722, fixed by #7723) (h/t cherniavskii) - Fix race condition in
feature-statedependent layers (#7523, fixed by #7790) - Prevent
map.repaintfrom mistakenly enabling continuous repaints (#7667) - Prevent map shaking while zooming in on raster tiles (#7426)
- Fix query point translation for multi-point geometry (#6833, fixed by #7581)
0.52.0
Breaking changes
- Canonicalize tile urls to
mapbox://urls so they can be transformed withconfig.API_URL(#7594)
Features and improvements
- Add getter and setter for
config.API_URL(#7594) - Allow user to define element other than map container for full screen control (#7548)
- Add validation option to style setters (#7604)
- Add 'idle' event: fires when no further rendering is expected without further interaction. (#7625)
Bug fixes
- Fire error when map.getLayoutProperty references missing layer (#7537, fixed by #7539)
- Fix shaky sprites when zooming with scrolling (#7558)
- Fix layout problems in attribution control (#7608) (h/t lucaswoj)
- Fixes resetting map's pitch to 0 if initial bounds is set (#7617) (h/t stepankuzmin)
- Fix occasional failure to load images after multiple image request abortions #7641
- Update repo url to correct one (#7486) (h/t nicholas-l)
- Fix bug where symbols where sometimes not rendered immediately (#7610)
- Fix bug where cameraForBounds returns incorrect CameraOptions with asymmetrical padding/offset (#7517, fixed by #7518) (h/t mike-marcacci)
- Use diff+patch approach to map.setStyle when the parameter is a URL (#4025, fixed by #7562)
- Begin touch zoom immediately when rotation disabled (#7582) (h/t msbarry)
- Fix symbol rendering under opaque fill layers (#7612)
- Fix shaking by aligning raster sources to pixel grid only when map is idle (7426)
- Fix raster layers in Edge 18 by disabling it's incomplete WebP support (7687)
- Fix memory leak in hillshade layer (7691)
- Fix disappearing custom layers (7711)
0.51.0
November 7, 2018
✨ Features and improvements
- Add initial bounds as map constructor option (#5518) (h/t stepankuzmin)
- Improve performance on machines with > 8 cores (#7407, fixed by #7430)
- Add
MercatorCoordinatetype (#7488) - Allow browser-native
contextmenuto be enabled (#2301, fixed by #7369) - Add an unminified production build to the NPM package (#7403)
- Add support for
LngLatconversion from{lat, lon}(#7507) (h/t bfrengley) - Add tooltips for navigation controls (#7373)
- Show attribution only for used sources (#7384)
- Add telemetry event to log map loads (#7431)
- Tighten style validation
🐛 Bug fixes
- Fix for GeoJSON geometries not working when coincident with tile boundaries(#7436, fixed by #7448)
- Fix depth buffer-related rendering issues on some Android devices. (#7471)
- Fix positioning of compact attribution strings (#7444, #7445, and #7391)
- Fix an issue with removing markers in mouse event callbacks (#7442) (h/t vbud)
- Remove controls before destroying a map (#7479)
- Fix display of Scale control values < 1 (#7469) (h/t MichaelHedman)
- Fix an error when using location
hashwithin iframes in IE11 (#7411) - Fix depth mode usage in custom layers (#7432) (h/t markusjohnsson)
- Fix an issue with shaky sprite images during scroll zooms (#7558)
0.50.0
October 10, 2018
✨ Features and improvements
- 🎉 Add Custom Layers that can be rendered into with user-provided WebGL code (#7039)
- Add WebGL face culling for increased performance (#7178)
- Improve speed of expression evaluation (#7334)
- Automatically coerce to string for
concatexpression andtext-fieldproperty (#6190, fixed by #7280) - Add
fill-extrusion-vertical-gradientproperty for controlling shading of fill extrusions (#5768, fixed by #6841) - Add update functionality for images provided via
ImageSource(#4050, fixed by #7342) (h/t dcervelli)
🐛 Bug fixes
- Expressions
- Fix expressions that use
log2andlog10in IE11 (#7318, fixed by #7320) - Fix
letexpression stripping expected type during parsing (#7300, fixed by #7301) - Fix superfluous wrapping of literals in
literalexpression (#7336, fixed by #7337) - Allow calling
to-coloron values that are already of typeColor(#7260) - Fix
to-arrayfor empty arrays ((#7261)) - Fix identity functions for
text-fieldwhen using formatted text (#7351) - Fix coercion of
nullto0into-numberexpression (#7083, fixed by #7274)
- Fix expressions that use
- Canvas source
- Rendering
- Fix rendering of fill extrusions with really high heights (#7292)
- Fix an error where the map state wouldn't return to
loadedafter certain runtime styling changes when there were errored tiles in the viewport (#7355) - Fix errors when rendering symbol layers without symbols (#7241, fixed by #7253)
- Don't fade in symbols with
*-allow-overlap: truewhen panning into the viewport (#7172, fixed by#7244)
- Library
- Fix disambiguation for
mouseoverevent (#7295, fixed by #7299) - Fix silent failure of
getImageif an SVG is requested (#7312, fixed by #7313) - Fix empty control group box shadow (#7303, fixed by #7304) (h/t Duder-onomy)
- Fixed an issue where a wrong timestamp was sent for Mapbox turnstile events (#7381)
- Fixed a bug that lead to attribution not showing up correctly in Internet Explorer (#3945, fixed by #7391)
- Fix disambiguation for
0.49.0
September 6, 2018
⚠️ Breaking changes
- Use
client{Height/Width}instead ofoffset{Height/Width}for map canvas sizing (#6848, fixed by #7128)
🐛 Bug fixes
- Fix Top Issues list for mapbox-gl-js (#7108, fixed by #7112)
- Fix bug in which symbols with
icon-allow-overlap: true, text-allow-overlap: true, text-optional: falsewould show icons when they shouldn't (#7041) - Fix bug where the map would not stop at the exact zoom level requested by Map#FlyTo (#7222) (#7223) (h/t benoitbzl)
- Keep map centered on the center point of a multi-touch gesture when zooming (#6722) (#7191) (h/t pakastin)
- Update the style-spec's old
gl-style-migratescript to include conversion of legacy functions and filters to their expression equivalents (#6927, fixed by #7095) - Fix
icon-sizefor small data-driven values (#7125) - Fix bug in the way AJAX requests load local files on iOS web view (#6610) (h/t oscarfonts)
- Fix bug in which canvas sources would not render in world wrapped tiles at the edge of the viewport ([#7271]https://github.com/mapbox/mapbox-gl-js/issues/7271), fixed by #7273)
✨ Features and improvements
- Performance updates:
- Improve time to first render by updating how feature ID maps are transferred to the main thread (#7110, fixed by #7132)
- Reduce size of JSON transmitted from worker thread to main thread (#7124)
- Improve image/glyph atlas packing algorithm (#7171)
- Use murmur hash on symbol instance keys to reduce worker transfer costs (#7127)
- Add GL state management for uniforms (#6018)
- Add
symbol-z-ordersymbol layout property to style spec (#7219) - Implement data-driven styling support for
*-pattern properties(#6289) - Add
Map#fitScreenCoordinateswhich fits viewport to two points, similar toMap#fitBoundsbut uses screen coordinates and supports non-zero map bearings (#6894) - Re-implement LAB/HSL color space interpolation for expressions (#5326, fixed by #7123)
- Enable benchmark testing for Mapbox styles (#7047)
- Allow
Map#setFeatureStateandMap#getFeatureStateto accept numeric IDs (#7106) (h/t bfrengley)
0.48.0
August 16, 2018
⚠️ Breaking changes
- Treat tiles that error with status 404 as empty renderable tiles to prevent rendering duplicate features in some sparse tilesets (#6803)
🐛 Bug fixes
- Fix issue where
text-max-angleproperty was being calculated incorrectly internally, causing potential rendering errors when"symbol-placement": line - Require
feature.idwhen usingMap#setFeatureState(#6974) - Fix issue with removing the
GeolocateControlwhen user location is being used (#6977) (h/t sergei-zelinsky) - Fix memory leak caused by a failure to remove all controls added to the map (#7042)
- Fix bug where the build would fail when using mapbox-gl webpack 2 and UglifyJSPlugin (#4359, fixed by #6956)
- Fix bug where fitBounds called with coordinates outside the bounds of Web Mercator resulted in uncaught error (#6906, fixed by #6918)
- Fix bug wherein
Map#querySourceFeatureswas returning bad results on zooms > maxZoom (#7061) - Relax typing for equality and order expressions (#6459, fixed by #6961)
- Fix bug where
queryPaddingfor all layers in a source was set by the first layer, causing incorrect querying on other layers and, in some cases, incorrect firing of events associated with individual layers (#6909)
✨ Features and improvements
- Performance Improvements:
- Add a user turnstile event for users accessing Mapbox APIs (#6980)
- Add support for autogenerating feature ids for GeoJSON sources so they can be used more easily with the
Map#setFeatureStateAPI (#7043)) (#7091) - Add ability to style symbol layers labels with multiple fonts and text sizes via
"format"expression (#6994) - Add customAttribution option to AttributionControl (#7033) (h/t mklopets)
- Publish Flow type definitions alongside compiled bundle (#7079)
- Introduce symbol cross fading when crossing integer zoom levels to prevent labels from disappearing before newly loaded tiles' labels can be rendered (#6951)
- Improvements in label collision detection (#6925))
0.47.0
✨ Features and improvements
- Add configurable drag pan threshold (#6809) (h/t msbarry)
- Add
raster-resamplingraster paint property (#6411) (h/t andrewharvey) - Add
symbol-placement: line-center(#6821) - Add methods for inspecting GeoJSON clusters (#3318, fixed by #6829)
- Add warning to geolocate control when unsupported (#6923) (h/t aendrew)
- Upgrade geojson-vt to 3.1.4 (#6942)
- Include link to license in compiled bundle (#6975)
🐛 Bug fixes
- Use updateData instead of re-creating buffers for repopulated paint arrays (#6853)
- Fix ScrollZoom handler setting tr.zoom = NaN (#6924)
- Fix heatmap tile clipping when layers are ordered above it (#6806, fixed by #6807)
- Fix video source in safari (macOS and iOS) (#6443, fixed by #6811)
- Do not reload errored tiles (#6813)
- Fix send / remove timing bug in Dispatcher (#6756, fixed by #6826)
- Fix flyTo not zooming to exact given zoom (#6828)
- Don't stop animation on map resize (#6636)
- Fix map.getBounds() with rotated map (#6875) (h/t zoltan-mihalyi)
- Support collators in feature filter expressions. (#6929)
- Fix Webpack production mode compatibility (#6981)
0.46.0
⚠️ Breaking changes
- Align implicit type casting behavior of
matchexpressions with withcase/==(#6684)
✨ Features and improvements
- :tada: Add
Map#setFeatureStateandfeature-stateexpression to support interactive styling (#6263) - Create draggable
MarkerwithsetDraggable(#6687) - Add
Map#listImagesfor listing all currently active sprites/images (#6381) - Add "crossSourceCollisions" option to disable cross-source collision detection (#6566)
- Handle
text/icon-rotatefor symbols withsymbol-placement: point(#6075) - Automatically compact Mapbox wordmark on narrow maps. (#4282) (h/t andrewharvey)
- Only show compacted AttributionControl on interactive displays (#6506) (h/t andrewharvey)
- Use postcss to inline svg files into css, reduce size of mapbox-gl.css (#6513) (h/t andrewharvey)
- Add support for GeoJSON attribution (#6364) (h/t andrewharvey)
- Add instructions for running individual unit and render tests (#6686)
- Make Map constructor fail if WebGL init fails. (#6744) (h/t uforic)
- Add browser fallback code for
collectResourceTiming: truein web workers (#6721) - Remove ignored usage of gl.lineWidth (#5541)
- Split new bounds calculation out of fitBounds into new method (#6683)
- Allow integration tests to be organized in an arbitrarily deep directory structure (#3920)
- Make "Missing Mapbox GL JS CSS" a console warning (#5786)
- Add rel="noopener" to Mapbox attribution link. (#6729) (h/t gorbypark)
- Update to deep equality check in example code (#6599) (h/t jonsadka)
- Upgrades!
🐛 Bug fixes
collectResourceTiming: truegenerates error on iOS9 Safari, IE 11 (#6690)- Fix PopupOptions flow type declarations (#6670) (h/t TimPetricola)
- Add className option to Popup constructor (#6502) (h/t Ashot-KR)
- GeoJSON MultiLineStrings with
lineMetrics=trueonly rendered first line (#6649) - Provide target property for mouseenter/over/leave/out events (#6623)
- Don't break on sources whose name contains "." (#6660)
- Rotate and pitch with navigationControl broke in v0.45 (#6650)
- Zero-width lines remained visible (#6769)
- Heatmaps inappropriately clipped at tile boundaries (#6806)
- Use named exports for style-spec entrypoint module (#6601
- Don't fire click event if default is prevented on mousedown for a drag event (#6697, fixes #6642)
- Double clicking to zoom in breaks map dragging/panning in Edge (#6740) (h/t GUI)
- *-transition properties cannot be set with setPaintProperty() (#6706)
- Marker with
aelement does not open the url when clicked (#6730) setRTLTextPluginfails with relative URLs (#6719)- Collision detection incorrect for symbol layers that share the same layout properties (#6548)
- Fix a possible crash when calling queryRenderedFeatures after querySourceFeatures (#6559)
- Fix a collision detection issue that could cause labels to temporarily be placed too densely during rapid panning (#5654)
0.45.0
⚠️ Breaking changes
Evented#fireandEvented#listensare now marked as private. ThoughEventedis still exported, andfireandlistensare still functional, we encourage you to seek alternatives; a future version may remove their API accessibility or change its behavior. If you are writing a class that needs event emitting functionality, consider usingEventEmitteror similar libraries instead.- The
"to-string"expression operator now convertsnullto an empty string rather than to"null". #6534
✨ Features and improvements
- :rainbow: Add
line-gradientproperty #6303 - Add
abs,round,floor, andceilexpression operators #6496 - Add
collatorexpression for controlling case and diacritic sensitivity in string comparisons #6270 - Add CSS linting to test suite (h/t @jasonbarry) #6071
- Add support for configurable maxzoom in
raster-demtilesets #6103 - Add
Map#isZoomingandMap#isRotatingmethods #6128, #6183 - Add support for Mapzen Terrarium tiles in
raster-demsources #6110 - Add
preventDefaultmethod onmousedown,touchstart, anddblclickevents #6218 - Add
originalEventproperty onzoomendandmoveendfor user-initiated scroll events (h/t @stepankuzmin) #6175 - Accept arguments of type
valuein"length"expressions #6244 - Introduce
MapWheelEvent#6237 - Add setter for
ScaleControlunits (h/t @ryanhamley) #6138, #6274 - Add
openevent forPopup#6311 - Explicit
"object"type assertions are no longer required when using expressions #6235 - Add
anchoroption toMarker#6350 HTMLElementis now passed toMarkeras part of theoptionsobject, but the old function signature is still supported for backwards compatibility #6356- Add support for custom colors when using the default
MarkerSVG element (h/t @andrewharvey) #6416 - Allow
CanvasSourceinitialization fromHTMLElement#6424 - Add
is-supported-scriptexpression 6260
🐛 Bug fixes
- Align
raster-demtiles to pixel grid to eliminate blurry rendering on some devices #6059 - Fix label collision circle debug drawing on overzoomed tiles #6073
- Improve error reporting for some failed requests #6126, #6032
- Fix several
Map#queryRenderedFeaturesbugs:- account for
{text, icon}-offsetwhen querying#6135 - correctly query features that extend across tile boundaries #5756
- fix querying of
circlelayer features with-pitch-scaling: 'viewport'or-pitch-alignment: 'map'#6036 - eliminate flicker effects when using query results to set a hover effect by switching from tile-based to viewport-based symbol querying #6497
- account for
- Preserve browser history state when updating the
Maphash #6140 - Fix undefined behavior when
Map#addLayeris invoked with anidof a preexisting layer #6147 - Fix bug where
icon-imagewould not be rendered iftext-fieldis an empty string #6164 - Ensure all camera methods fire
rotatestartandrotateendevents #6187 - Always hide duplicate labels #6166
- Fix
DragHandlerbugs where a left-button mouse click would end a right-button drag rotate and a drag gesture would not end if the control key is down onmouseup#6193 - Add support for calling
{DragPanHandler, DragRotateHandler}#disablewhile a gesture is in progress #6232 - Fix
GeolocateControluser location dot sizing whenMap's<div>inheritsbox-sizing: border-box;(h/t @andrewharvey) #6227 - Fix bug causing an off-by-one error in
arrayexpression error messages (h/t @drewbo) #6269 - Improve error message when an invalid access token triggers a 401 error #6283
- Fix bug where lines with
line-widthlarger than the sprite height of theline-patternproperty would render other sprite images #6246 - Fix broken touch events for
DragPanHandleron mobile using Edge (note that zoom/rotate/pitch handlers still do not support Edge touch events #1928) #6325 - Fix race condition in
VectorTileWorkerSource#reloadTilecausing a rendering timeout #6308 - Fix bug causing redundant
gl.stencilFunccalls due to incorrect state checking (h/t @yangdonglai) #6330 - Fix bug where
mousedownortouchstartwould cancel camera animations in non-interactive maps #6338 - Fix bug causing a full-screen flicker when the map is pitched and a symbol layer uses non-zero
text-translate#6365 - Fix bug in
to-rgbaexpression causing division by zero 6388 - Fix bug in cross-fading for
*-patternproperties with non-integer zoom stops #6430 - Fix bug where calling
Map#removeon a map with constructor optionhash: truethrows an error (h/t @allthesignals) #6490 - Fix bug causing flickering when panning across the anti-meridian #6438
- Fix error when using tiles of non-power-of-two size #6444
- Fix bug causing
Map#moveLayer(layerId, beforeId)to remove the layer whenlayerId === beforeId#6542
- Fix Rollup build for style-spec module 6575
- Fix bug causing
Map#querySourceFeaturesto throw anUncaught TypeError(https://github.com/mapbox/mapbox-gl-js/pull/6555) - Fix issue where label collision detection was inaccurate for some symbol layers that shared layout properties with another layer #6558
- Restore
targetproperty formouse{enter,over,leave,out}events #6623
0.44.2
🐛 Bug fixes
- Workaround a breaking change in Safari causing page to scroll/zoom in response to user actions intended to pan/zoom the map #6095. (N.B., not to be confused with the workaround from April 2017 dealing with the same breaking change in Chrome #4259. See also https://github.com/WICG/interventions/issues/18, https://bugs.webkit.org/show_bug.cgi?id=182521, https://bugs.chromium.org/p/chromium/issues/detail?id=639227 .)
0.44.1
🐛 Bug fixes
- Fix bug causing features from symbol layers to be omitted from
map.queryRenderedFeatures()#6074 - Fix error triggered by simultaneous scroll-zooming and drag-panning. #6106
- Fix bug wherein drag-panning failed to resume after a brief pause #6063
0.44.0
✨ Features and improvements
- The CSP policy of a page using mapbox-gl-js no longer needs to include
script-src 'unsafe-eval'#559 - Add
LngLatBounds#isEmpty()method #5917 - Updated to flow 0.62.0 #5923
- Make compass and zoom controls optional (#5348) (h/t @matijs)
- Add
collectResourceTimingoption to the enable collection of Resource Timing data for requests that are made from Web Workers. (#5948) - Improve user location dot appearance across browsers (#5498) (h/t @jasonbarry)
🐛 Bug fixes
- Fix error triggered by
==and!=expressions #5947 - Image sources honor
renderWorldCopies#5932 - Fix transitions to default fill-outline-color #5953
- Fix transitions for light properties #5982
- Fix minor symbol collisions on pitched maps #5913
- Fix memory leaks after
Map#remove()#5943, #5951 - Fix bug wherein
GeoJSONSource#setData()caused labels to fade out and back in (#6002) - Fix bug that could cause incorrect collisions for labels placed very near to each other at low zoom levels (#5993)
- Fix bug causing
moveevents to be fired out of sync with actual map movements (#6005) - Fix bug wherein
Mapdid not firemouseoverevents (#6000] (h/t @jay-manday) - Fix bug causing blurry rendering of raster tiles (#4552)
- Fix potential memory leak caused by removing layers (#5995)
- Fix bug causing attribution icon to appear incorrectly in compact maps not using Mapbox data (#6042)
- Fix positioning of default marker element (#6012) (h/t @andrewharvey)
0.43.0 (December 21, 2017)
⚠️ Breaking changes
- It is now an error to attempt to remove a source that is in use #5562
- It is now an error if the layer specified by the
beforeparameter tomoveLayerdoes not exist #5679 "colorSpace": "hcl"now uses shortest-path interpolation for hue #5811
✨ Features and improvements
- Introduce client-side hillshading with
raster-demsource type andhillshadelayer type #5286 - GeoJSON sources take 2x less memory and generate tiles 20%–100% faster #5799
- Enable data-driven values for text-font #5698
- Enable data-driven values for heatmap-radius #5898
- Add getter and setter for offset on marker #5759
- Add
Map#hasImage#5775 - Improve typing for
==and!=expressions #5840 - Made
coalesceexpressions more useful #5755 - Enable implicit type assertions for array types #5738
- Improve hash control precision #5767
supported()now returns false on old IE 11 versions that don't support Web Worker blob URLs #5801- Remove flow globals TileJSON and Transferable #5668
- Improve performance of image, video, and canvas sources #5845
🐛 Bug fixes
- Fix popups and markers lag during pan animation #4670
- Fix fading of symbol layers caused by setData #5716
- Fix behavior of
to-rgbaandrgbaexpressions #5778, #5866 - Fix cross-fading of
*-patternandline-dasharray#5791 - Fix
colorSpacefunction property #5843 - Fix style diffing when changing GeoJSON source properties #5731
- Fix missing labels when zooming out from overzoomed tile #5827
- Fix missing labels when zooming out and quickly using setData #5837
- Handle NaN as input to step and interpolate expressions #5757
- Clone property values on input and output #5806
- Bump geojson-rewind dependency #5769
- Allow setting Marker's popup before LngLat #5893
0.42.2 (November 21, 2017)
🐛 Bug fixes
- Add box-sizing to the "mapboxgl-ctrl-scale"-class #5715
- Fix rendering in Safari #5712
- Fix "Cannot read property 'hasTransition' of undefined" error #5714
- Fix misplaced raster tiles #5713
- Fix raster tile fading #5722
- Ensure that an unset filter is undefined rather than null #5727
- Restore pitch-with-rotate to nav control #5725
- Validate container option in map constructor #5695
- Fix queryRenderedFeatures behavior for features displayed in multiple layers #5172
0.42.1 (November 17, 2017)
🐛 Bug fixes
- Workaround for map flashing bug on Chrome 62+ with Intel Iris Graphics 6100 cards #5704
- Rerender map when
map.showCollisionBoxesis set tofalse#5673 - Fix transitions from property default values #5682
- Fix runtime updating of
heatmap-color#5682 - Fix mobile Safari
history.replaceStateerror #5613
✨ Features and improvements
- Provide default element for Marker class #5661
0.42.0 (November 10, 2017)
⚠️ Breaking changes
- Require that
heatmap-coloruse expressions instead of stop functions #5624 - Remove support for validating and migrating v6 styles
- Remove support for validating v7 styles #5604
- Remove support for including
{tokens}in expressions fortext-fieldandicon-image#5599 - Split
curveexpression intostepandinterpolateexpressions #5542 - Disallow interpolation in expressions for
line-dasharray#5519
✨ Features and improvements
- Improve label collision detection #5150
- Labels from different sources will now collide with each other
- Collisions caused by rotation and pitch are now smoothly transitioned with a fade
- Improved algorithm for fewer erroneous collisions, denser label placement, and greater label stability during rotation
- Add
sqrtexpression #5493
🐛 Bug fixes and error reporting improvements
- Fix viewport calculations for
fitBoundswhen both zooming and padding change #4846 - Fix WebGL "range out of bounds for buffer" error caused by sorted symbol layers #5620
- Fix symbol fading across tile reloads #5491
- Change tile rendering order to better match GL Native #5601
- Ensure no errors are triggered when calling
queryRenderedFeatureson a heatmap layer #5594 - Fix bug causing
queryRenderedSymbolsto return results from different sources #5554 - Fix CJK rendering issues #5544, #5546
- Account for
circle-stroke-widthinqueryRenderedFeatures#5514 - Fix rendering of fill layers atop raster layers #5513
- Fix rendering of circle layers with a
circle-stroke-opacityof 0 #5496 - Fix memory leak caused by actor callbacks #5443
- Fix source cache size for raster sources with tile sizes other than 512px #4313
- Validate that zoom expressions only appear at the top level of an expression #5609
- Validate that step and interpolate expressions don't have any duplicate stops #5605
- Fix rendering for
icon-text-fitwith a data-driventext-size#5632 - Improve validation to catch uses of deprecated function syntax #5667
- Permit altitude coordinates in
positionfield in GeoJSON #5608
0.41.0 (October 11, 2017)
:warning: Breaking changes
- Removed support for paint classes #3643. Instead, use runtime styling APIs or
Map#setStyle. - Reverted the
canvassourcecontextTypeoption added in 0.40.0 #5449
:bug: Bug fixes
- Clip raster tiles to avoid tile overlap #5105
- Guard for offset edgecase in flyTo #5331
- Ensure the map is updated after the sprite loads #5367
- Limit animation duration on flyTo with maxDuration option #5349
- Make double-tapping on make zoom in by a factor of 2 on iOS #5274
- Fix rendering error with translucent raster tiles #5380
- Error if invalid 'before' argument is passed to Map#addLayer #5401
- Revert CanvasSource intermediary image buffer fix #5449
:sparkles: Features and improvements
-
Use setData operation when diffing geojson sources #5332
-
Return early from draw calls on layers where opacity=0 #5429
-
A heatmap layer type is now available. This layer type allows you to visualize and explore massive datasets of points, reflecting the shape and density of data well while also looking beautiful. See the blog post for further details.

-
The value of a style property or filter can now be an expression. Expressions are a way of doing data-driven and zoom-driven styling that provides more flexibility and control, and unifies property and filter syntax.
Previously, data-driven and zoom-driven styling relied on stop functions: you specify a feature property and a set of input-output pairs that essentially define a “scale” for how the style should be calculated based on the feature property. For example, the following would set circle colors on a green-to-red scale based on the value of
feature.properties.population:"circle-color": { "property": "population", "stops": [ [0, "green"], [1000000, "red"] ] }This approach is powerful, but we’ve seen a number of use cases that stop functions don't satisfy. Expressions provide the flexibility to address use cases like these:
Multiple feature properties Using more than one feature property to calculate a given style property. E.g., styling land polygon colors based on both
feature.properties.land_use_categoryandfeature.properties.elevation.Arithmetic For some use cases it’s necessary to do some arithmetic on the input data. One example is sizing circles to represent quantitative data. Since a circle’s visual size on the screen is really its area (and A=πr^2), the right way to scale
circle-radiusissquare_root(feature.properties.input_data_value). Another example is unit conversions: feature data may include properties that are in some particular unit. Displaying such data in units appropriate to, say, a user’s preference or location, requires being able to do simple arithmetic (multiplication, division) on whatever value is in the data.Conditional logic This is a big one: basic if-then logic, for example to decide exactly what text to display for a label based on which properties are available in the feature or even the length of the name. A key example of this is properly supporting bilingual labels, where we have to decide whether to show local + English, local-only, or English-only, based on the data that’s available for each feature.
String manipulation More dynamic control over label text with things like uppercase/lowercase/title case transforms, localized number formatting, etc. Without this functionality, crafting and iterating on label content entails a large data-prep burden.
Filters Style layer filters had similar limitations. Moreover, they use a different syntax, even though their job is very similar to that of data-driven styling functions: filters say, “here’s how to look at a feature and decide whether to draw it,” and data-driven style functions say, “here’s how to look at a feature and decide how to size/color/place it.” Expressions provide a unified syntax for defining parts of a style that need to be calculated dynamically from feature data.
For information on the syntax and behavior of expressions, please see the documentation.
:wrench: Development workflow improvements
- Made the performance benchmarking runner more informative and statistically robust
0.40.1 (September 18, 2017)
:bug: Bug fixes
- Fix bug causing flicker when zooming in on overzoomed tiles #5295
- Remove erroneous call to Tile#redoPlacement for zoom-only or low pitch camera changes #5284
- Fix bug where
CanvasSourcecoordinates were flipped and improve performance for non-animatedCanvasSources #5303 - Fix bug causing map not to render on some cases on Internet Explorer 11 #5321
- Remove upper limit on
fill-extrusion-heightproperty #5320
0.40.0 (September 13, 2017)
:warning: Breaking changes
Map#addImagenow requires the image as anHTMLImageElement,ImageData, or object withwidth,height, anddataproperties with the same format asImageData. It no longer accepts a rawArrayBufferViewin the second argument andwidthandheightoptions in the third argument.canvassources now require acontextTypeoption specifying the drawing context associated with the source canvas. #5155
:sparkles: Features and improvements
- Correct rendering for multiple
fill-extrusionlayers on the same map #5101 - Add an
icon-anchorproperty to symbol layers #5183 - Add a per-map
transformRequestoption, allowing users to provide a callback that transforms resource request URLs #5021 - Add data-driven styling support for
- Add support for SDF icons in
Map#addImage()#5181 - Added nautical miles unit to ScaleControl #5238 (h/t @fmairesse)
- Eliminate the map-wide limit on the number of glyphs and sprites that may be used in a style #141. (Fixed by #5190, see also mapbox-gl-native#9213
- Numerous performance optimizations (including #5108 h/t @pirxpilot)
:bug: Bug fixes
- Add missing documentation for mouseenter, mouseover, mouseleave events #4772
- Add missing documentation for
Marker#getElement()method #5242 - Fix bug wherein removing canvas source with animate=true leaves map in render loop #5097
- Fix fullscreen detection on Firefox #5272
- Fix z-fighting on overlapping fills within the same layer #3320
- Fix handling of fractional values for
layer.minzoom#2929 - Clarify coordinate ordering in documentation for
centeroption #5042 (h/t @karthikb351) - Fix output of stop functions where two stops have the same input value #5020 (h/t @edpop )
- Fix bug wherein using
Map#addLayer()with an inline source would mutate its input #4040 - Fix invalid css keyframes selector #5075 (h/t @aar0nr)
- Fix GPU-specific bug wherein canvas sources caused an error #4262
- Fix a race condition in symbol layer handling that caused sporadic uncaught errors #5185
- Fix bug causing line labels to render incorrectly on overzoomed tiles #5120
- Fix bug wherein
NavigationControltriggered mouse events unexpectedly #5148 - Fix bug wherein clicking on the
NavigationControlcompass caused an error in IE 11 #4784 - Remove dependency on GPL-3-licensed
fast-stable-stringifymodule #5152 - Fix bug wherein layer-specific an event listener produced an error after its target layer was removed from the map #5145
- Fix
Marker#togglePopup()failing to return the marker instance #5116 - Fix bug wherein a marker's position failed to adapt to the marker element's size changing #5133
- Fix rendering bug affecting Broadcom GPUs #5073
:wrench: Development workflow improvements
- Add (and now require) Flow type annotations throughout the majority of the codebase.
- Migrate to CircleCI 2.0 #4939
0.39.1 (July 24, 2017)
:bug: Bug fixes
0.39.0 (July 21, 2017)
:warning: Breaking changes
GeolocateControlbreaking changes #4479- The option
watchPositionhas been replaced withtrackUserLocation - The camera operation has changed from
jumpTo(not animated) tofitBounds(animated). An effect of this is the map pitch is no longer reset, although the bearing is still reset to 0. - The accuracy of the geolocation provided by the device is used to set the view (previously it was fixed at zoom level 17). The
maxZoomcan be controlled via the newfitBoundsOptionsoption (defaults to 15).
- The option
- Anchor
Markers at their center by default #5019 @andrewharvey - Increase
significantRotateThresholdfor theTouchZoomRotateHandler#4971, @dagjomar
:sparkles: Features and improvements
- Improve performance of updating GeoJSON sources #4069, @ezheidtmann
- Improve rendering speed of extrusion layers #4818
- Improve line label legibility in pitched views #4781
- Improve line label legibility on curved lines #4853
- Add user location tracking capability to
GeolocateControl#4479, @andrewharvey- New option
showUserLocationto draw a "dot" as aMarkeron the map at the user's location - An active lock and background state are introduced with
trackUserLocation. When in active lock the camera will update to follow the user location, however if the camera is changed by the API or UI then the control will enter the background state where it won't update the camera to follow the user location. - New option
fitBoundsOptionsto control the camera operation - New
trackuserlocationstartandtrackuserlocationendevents - New
LngLat.toBoundsmethod to extend a point location by a given radius to aLngLatBoundsobject
- New option
- Include main CSS file in
package.json#4809, @tomscholz - Add property function (data-driven styling) support for
line-width#4773 - Add property function (data-driven styling) support for
text-anchor#4997 - Add property function (data-driven styling) support for
text-justify#5000 - Add
maxTileCacheSizeoption #4778, @jczaplew - Add new
icon-pitch-alignmentandcircle-pitch-alignmentproperties #4869 #4871 - Add
Map#getMaxBoundsmethod #4890, @andrewharvey @lamuertepeluda - Add option (
localIdeographFontFamily) to use TinySDF to avoid loading expensive CJK glyphs #4895 - If
config.API_URLincludes a path prepend it to the request URL #4995 - Bump
superclusterversion to exposecluster_idproperty on clustered sources #5002
:bug: Bug fixes
- Do not display
FullscreenControlon unsupported devices #4838, @stepankuzmin - Fix yarn build on Windows machines #4887
- Prevent potential memory leaks by dispatching
loadDatato the same worker every time #4877 - Fix bug preventing the rtlTextPlugin from loading before the initial style
load#4870 - Fix bug causing runtime-stying to not take effect in some situations #4893
- Prevent requests of vertical glyphs for labels that can't be verticalized #4720
- Fix character detection for Zanabazar Square #4940
- Fix
LogoControllogic to update correctly, and hide the<div>instead of removing it from the DOM when it is not needed #4842 - Fix
GeoJSONSource#serializeto include all options - Fix error handling in
GlyphSource#getSimpleGlyphs#4992 - Fix bug causing
setStyleto reload raster tiles #4852 - Fix bug causing symbol layers not to render on devices with non-integer device pixel ratios #4989
- Fix bug where
Map#queryRenderedFeatureswould error when returning no results #4993 - Fix bug where
Map#areTilesLoadedwould always be false onsourcedataevents for reloading tiles #4987 - Fix bug causing categorical property functions to error on non-ascending order stops #4996
:hammer_and_wrench: Development workflow changes
- Use flow to type much of the code base #4629 #4903 #4909 #4910 #4911 #4913 #4915 #4918 #4932 #4933 #4948 #4949 #4955 #4966 #4967 #4973 :muscle: @jfirebaugh @vicapow
- Use style specification to generate flow type #4958
- Explicitly list which files to publish in
package.json#4819 @tomscholz - Move render test ignores to a separate file #4977
- Add code of conduct #5015 :sparkling_heart:
0.38.0 (June 9, 2017)
New features :sparkles:
- Attenuate label size scaling with distance, improving readability of pitched maps #4547
Bug fixes :beetle:
- Skip rendering for patterned layers when pattern is missing #4687
- Fix bug with map failing to rerender after
webglcontextlostevent #4725 @cdawi - Clamp zoom level in
flyToto within the map's specified min- and maxzoom to prevent undefined behavior #4726 @ IvanSanchez - Fix wordmark rendering in IE #4741
- Fix slight pixelwise symbol rendering bugs caused by incorrect sprite calculations #4737
- Prevent exceptions thrown by certain
flyTocalls #4761 - Fix "Improve this map" link #4685
- Tweak
queryRenderedSymbolslogic to better account for pitch scaling #4792 - Fix for symbol layers sometimes failing to render, most frequently in Safari #4795
- Apply
text-keep-uprightaftertext-offsetto keep labels upright when intended #4779 [Potentially breaking :warning: but considered a bugfix] - Prevent exceptions thrown by empty GeoJSON tiles 4803
Accessibility improvements :sound:
- Add
aria-labelto popup close button #4799 @andrewharvey
Development workflow + testing improvements :wrench:
- Fix equality assertion bug in tests #4731 @IvanSanchez
- Benchmark results page improvements #4746
- Require node version >=6.4.0, enabling the use of more ES6 features #4752
- Document missing
pitchWithRotateoption #4800 @simast - Move Github-specific Markdown files into subdirectory #4806 @tomscholz
0.37.0 (May 2nd, 2017)
:warning: Breaking changes
- Removed
LngLat#wrapToBestWorld
New features :rocket:
- Improve popup/marker positioning #4577
- Add
Map#isStyleLoadedandMap#areTilesLoadedevents #4321 - Support offline sprites using
file:protocol #4649 @oscarfonts
Bug fixes :bug:
- Fix fullscreen control in Firefox #4666
- Fix rendering artifacts that caused tile boundaries to be visible in some cases #4636
- Fix default calculation for categorical zoom-and-property functions #4657
- Fix scaling of images on retina screens #4645
- Rendering error when a transparent image is added via
Map#addImage#4644 - Fix an issue with rendering lines with duplicate points #4634
- Fix error when switching from data-driven styles to a constant paint value #4611
- Add check to make sure invalid bounds on tilejson don't error out #4641
Development workflow improvements :computer:
- Add flowtype interfaces and definitions @vicapow
- Add stylelinting to ensure
mapboxgl-prefix on all classes #4584 @asantos3026
0.36.0 (April 19, 2017)
New features :sparkles:
- Replace LogoControl logo with the new Mapbox logo #4598
Bug fixes :bug:
- Fix bug with the BoxZoomHandler that made it glitchy if it is enabled after the DragPanHandler #4528
- Fix undefined behavior in
fill_outlineshaders #4600 - Fix
Camera#easeTointerpolation on pitched maps #4540 - Choose property function interpolation method by the
property's type #4614
Development workflow improvements :nerd_face:
- Fix crash on missing
style.jsonin integration tests gl-style-compositeis now executable in line with the other tools @andrewharvey #4595gl-style-compositeutility now throws an error if a name conflict would occur between layers @andrewharvey #4595
0.35.1 (April 12, 2017)
Bug fixes :bug:
- Add
.jsonextension to style-specrequirestatements for webpack compatibility #4563 @orangemug - Fix documentation type for
Map#fitBounde#4569 @andrewharvey - Fix bug causing {Image,Video,Canvas}Source to throw exception if latitude is outside of +/-85.05113 #4574
- Fix bug causing overzoomed raster tiles to disappear from map #4567
- Fix bug causing queryRenderedFeatures to crash on polygon features that have an
idfield. #4581
0.35.0 (April 7, 2017)
New features :rocket:
- Use anisotropic filtering to improve rendering of raster tiles on pitched maps #1064
- Add
pitchstartandpitchendevents #2449 - Add an optional
layersparameter toMap#on#1002 - Add data-driven styling support for
text-offset#4495 - Add data-driven styling support for
text-rotate#3516 - Add data-driven styling support for
icon-image#4304 - Add data-driven styling support for
{text,icon}-size#4455
Bug fixes :bug:
- Suppress error messages in JS console due to missing tiles #1800
- Fix bug wherein
GeoJSONSource#setData()could cause unnecessary DOM updates #4447 - Fix bug wherein
Map#flyTodid not respect therenderWorldCopiessetting #4449 - Fix regression in browserify support # 4453
- Fix bug causing poor touch event behavior on mobile devices #4259
- Fix bug wherein duplicate stops in property functions could cause an infinite loop #4498
- Respect image height/width in
addImageapi #4531 - Fix bug preventing correct behavior of
shift+zoom#3334 - Fix bug preventing image source from rendering when coordinate area is too large #4550
- Show image source on horizontally wrapped worlds #4555
- Fix bug in the handling of
refreshedExpiredTilesoption #4549 - Support the TileJSON
boundsproperty #1775
Development workflow improvements :computer:
- Upgrade flow to 0.42.0 (#4500)
0.34.0 (March 17, 2017)
New features :rocket:
- Add
Map#addImageandMap#removeImageAPI to allow adding icon images at runtime #4404 - Simplify non-browserify bundler usage by making the distribution build the main entrypoint #4423
Bug fixes :bug:
- Fix issue where coincident start/end points of LineStrings were incorrectly rendered as joined #4413
- Fix bug causing
queryRenderedFeaturesto fail in cases where both multiple sources and data-driven paint properties were present #4417 - Fix bug where tile request errors caused
map.loaded()to incorrectly returnfalse#4425
Testing improvements :white_check_mark:
- Improve test coverage across several core modules #4432 #4431 #4422 #4244 :bowing_man:
0.33.1 (March 10, 2017)
Bug fixes :bug:
- Prevent Mapbox logo from being added to the map more than once #4386
- Add
type='button'toFullscreenControlto prevent button from acting as a form submit #4397 - Fix issue where map would continue to rotate if
Ctrlkey is released before the click during aDragRotateevent #4389 - Remove double
options.easingdescription from theMap#fitBoundsdocumentation #4402
0.33.0 (March 8, 2017)
:warning: Breaking changes
- Automatically add Mapbox wordmark when required by Mapbox TOS #3933
- Increase default
maxZoomfrom 20 to 22 #4333 - Deprecate
tiledataandtiledataloadingevents in favor ofsourcedataandsourcedataloading. #4347 mapboxgl.utilis no longer exported #1408"type": "categorical"is now required for all categorical functions. Previously, some forms of "implicitly" categorical functions worked, and others did not. #3717
:white_check_mark: New features
- Add property functions support for most symbol paint properties #4074, #4186, #4226
- Add ability to specify default property value for undefined or invalid property values used in property functions. #4175
- Improve
Map#fitBoundsto accept different values for top, bottom, left, and rightpadding#3890 - Add a
FullscreenControlfor displaying a fullscreen map #3977
:beetle: Bug fixes
- Fix validation error on categorical zoom-and-property functions #4220
- Fix bug causing expired resources to be re-requested causing an infinite loop #4255
- Fix problem where
MapDataEvent#isSourceLoadedalways returned false #4254 - Resolve an issue where tiles in the source cache were prematurely deleted, resulting in tiles flickering when zooming in and out and #4311
- Make sure
MapEventDatais passed through on callsMap#flyTo#4342 - Fix incorrect returned values for
Map#isMoving#4350 - Fix categorical functions not allowing boolean stop domain values #4195
- Fix piecewise-constant functions to allow non-integer zoom levels. #4196
- Fix issues with
$idin filters #4236 #4237 - Fix a race condition with polygon centroid algorithm causing tiles not to load in some cases. #4273
- Throw a meaningful error when giving non-array
layersparameter toqueryRenderedFeatures#4331 - Throw a meaningful error when supplying invalid
minZoomandmaxZoomvalues #4324 - Fix a memory leak when using the RTL Text plugin #4248
Dev workflow changes
- Merged the Mapbox GL style specification repo to this one (now under
src/style-specandtest/unit/style-spec).
0.32.1 (Jan 26, 2017)
Bug Fixes
- Fix bug causing
mapbox-gl-rtl-textplugin to not work #4055
0.32.0 (Jan 26, 2017)
Deprecation Notices
- Style classes are deprecated and will be removed in an upcoming release of Mapbox GL JS.
New Features
- Add
Map#isSourceLoadedmethod #4033 - Automatically reload tiles based on their
ExpiresandCache-ControlHTTP headers #3944 - Add
around=centeroption toscrollZoomandtouchZoomRotateinteraction handlers #3876 - Add support for
mapbox-gl-rtl-textplugin to support right-to-left scripts #3758 - Add
canvassource type #3765 - Add
Map#isMovingmethod #2792
Bug Fixes
- Fix bug causing garbled text on zoom #3962
- Fix bug causing crash in Firefox and Mobile Safari when rendering a large map #4037
- Fix bug causing raster tiles to flicker during zoom #2467
- Fix bug causing exception when unsetting and resetting fill-outline-color #3657
- Fix memory leak when removing raster sources #3951
- Fix bug causing exception when when zooming in / out on empty GeoJSON tile #3985
- Fix line join artifacts at very sharp angles #4008
0.31.0 (Jan 10 2017)
New Features
- Add
renderWorldCopiesoption to theMapconstructor to give users control over whether multiple worlds are rendered in a map #3885
Bug Fixes
- Fix performance regression triggered when
Mappitch or bearing is changed #3938 - Fix null pointer exception caused by trying to clear an
undefinedsource #3903
Miscellaneous
- Incorporate integration tests formerly at
mapbox-gl-test-suiteinto this repository #3834
0.30.0 (Jan 5 2017)
New Features
- Fire an error when map canvas is larger than allowed by
gl.MAX_RENDERBUFFER_SIZE#2893 - Improve error messages when referencing a nonexistent layer id #2597
- Fire an error when layer uses a
geojsonsource and specifies asource-layer#3896 - Add inline source declaration syntax #3857
- Improve line breaking behavior #3887
Performance Improvements
- Improve
Map#setStyleperformance in some cases #3853
Bug Fixes
- Fix unexpected popup positioning when some offsets are unspecified #3367
- Fix incorrect interpolation in functions #3838
- Fix incorrect opacity when multiple backgrounds are rendered #3819
- Fix exception thrown when instantiating geolocation control in Safari #3844
- Fix exception thrown when setting
showTileBoundarieswith no sources #3849 - Fix incorrect rendering of transparent parts of raster layers in some cases #3723
- Fix non-terminating render loop when zooming in in some cases #3399
0.29.0 (December 20 2016)
New Features
- Add support for property functions for many style properties on line layers #3033
- Make
Map#setStylesmoothly transition to the new style #3621 - Add
styledata,sourcedata,styledataloading, andsourcedataloadingevents - Add
isSourceLoadedandsourceproperties toMapDataEvent#3590 - Remove "max zoom" cap of 20 #3683
- Add
circle-stroke-*style properties #3672 - Add a more helpful error message when the specified
containerelement doesn't exist #3719 - Add
watchPositionoption toGeolocateControl#3739 - Add
positionOptionsoption toGeolocateControl#3739 - Add
aria-labelto map canvas #3782 - Adjust multipoint symbol rendering behavior #3763
- Add support for property functions for
icon-offset#3791 - Improved antialiasing on pitched lines #3790
- Allow attribution control to collapse to an ⓘ button on smaller screens #3783
- Improve line breaking algorithm #3743
Performance Improvements
- Fix memory leak when calling
Map#removeSource#3602 - Reduce bundle size by adding custom build of
gl-matrix#3734 - Improve performance of projection code #3721
- Improve performance of style function evaluation #3816
Bug fixes
- Fix exception thrown when using
line-colorproperty functions #3639 - Fix exception thrown when removing a layer and then adding another layer with the same id but different type #3655
- Fix exception thrown when passing a single point to
Map#fitBounds#3655 - Fix exception thrown occasionally during rapid map mutations #3681
- Fix rendering defects on pitch=0 on some systems #3740
- Fix unnecessary CPU usage when displaying a raster layer #3764
- Fix bug causing sprite after
Map#setStyle#3829 - Fix bug preventing
Mapfrom emitting acontextmenuevent on Windows browsers #3822
0.28.0 (November 17 2016)
New features and improvements
- Performance improvements for
Map#addLayerandMap#removeLayer#3584 - Add method for changing layer order at runtime -
Map#moveLayer#3584 - Update vertical punctuation logic to Unicode 9.0 standard #3608
Bug fixes
- Fix data-driven
fill-opacityrendering when using afill-pattern#3598 - Fix line rendering artifacts #3627
- Fix incorrect rendering of opaque fills on top of transparent fills #2628
- Prevent
AssertionErrorsfrom pitching raster layers by only callingWorker#redoPlacementon vector and GeoJSON sources #3624 - Restore IE11 compatability #3635
- Fix symbol placement for cached tiles #3637
0.27.0 (November 11 2016)
⚠️ Breaking changes ⚠️
- Replace
fill-extrude-heightandfill-extrude-baseproperties offillrender type with a separatefill-extrusiontype (with correspondingfill-extrusion-heightandfill-extrusion-baseproperties), solving problems with render parity and runtime switching between flat and extruded fills. https://github.com/mapbox/mapbox-gl-style-spec/issues/554 - Change the units for extrusion height properties (
fill-extrusion-height,fill-extrusion-base) from "magic numbers" to meters. #3509 - Remove
mapboxgl.Controlclass and change the way custom controls should be implemented. #3497 - Remove
mapboxgl.utilfunctions:inherit,extendAll,debounce,coalesce,startsWith,supportsGeolocation. #3441 #3571 mapboxgl.utilis deprecated and will be removed in the next release. #1408
New features and improvements
- Tons of performance improvements that combined make rendering up to 3 times faster, especially for complex styles. #3485 #3489 #3490 #3491 #3498 #3499 #3501 #3510 #3514 #3515 #3486 #3527 #3574 ⚡️⚡️⚡️
- 🈯 Added vertical text writing mode for languages that support it. #3438
- 🈯 Improved line breaking of Chinese and Japanese text in point-placed labels. #3420
- Reduce the default number of worker threads (
mapboxgl.workerCount) for better performance. #3565 - Automatically use
categoricalstyle function type when input values are strings. #3384 - Improve control buttons accessibility. #3492
- Remove geolocation button if geolocation is disabled (e.g. the page is not served through
https). #3571 - Added
Map#getMaxZoomandMap#getMinZoommethods #3592
Bugfixes
- Fix several line dash rendering bugs. #3451
- Fix intermittent map flicker when using image sources. #3522
- Fix incorrect rendering of semitransparent
backgroundlayers. #3521 - Fix broken
raster-fade-durationproperty. #3532 - Fix handling of extrusion heights with negative values (by clamping to
0). #3463 - Fix GeoJSON sources not placing labels/icons correctly after map rotation. #3366
- Fix icon/label placement not respecting order for layers with numeric names. #3404
- Fix
queryRenderedFeaturesworking incorrectly on colliding labels. #3459 - Fix a bug where changing extrusion properties at runtime sometimes threw an error. #3487 #3468
- Fix a bug where
map.loaded()always returnedtruewhen using raster tile sources. #3302 - Fix a bug where moving the map out of bounds sometimes threw
failed to invert matrixerror. #3518 - Fixed
queryRenderedFeaturesthrowing an error if no parameters provided. #3542 - Fixed a bug where using multiple
\nin a text field resulted in an error. #3570
Misc
- 🐞 Fix
npm install mapbox-glpulling in alldevDependencies, leading to an extremely slow install. #3377 - Switch the codebase to ES6. #3388 #3408 #3415 #3421
- A lot of internal refactoring to make the codebase simpler and more maintainable.
- Various documentation fixes. #3440
0.26.0 (October 13 2016)
New Features & Improvements
- Add
fill-extrude-heightandfill-extrude-basestyle properties (3d buildings) :cityscape: #3223 - Add customizable
colorSpaceinterpolation to functions #3245 - Add
identityfunction type #3274 - Add depth testing for symbols with
'pitch-alignment': 'map'#3243 - Add
dataloadingevents for styles and sources #3306 - Add
Controlsuffix to all controls :warning: BREAKING CHANGE :warning: #3355 - Calculate style layer
refs automatically and get rid of user-specifiedrefs :warning: BREAKING CHANGE :warning: #3486
Performance Improvements
- Ensure removing style or source releases all tile resources #3359
Bugfixes
- Fix bug causing an error when
Marker#setLngLatis called #3294 - Fix bug causing incorrect coordinates in
touchendon Android Chrome #3319 - Fix bug causing incorrect popup positioning at top of screen #3333
- Restore
tileproperty todataevents fired when a tile is removed #3328 - Fix bug causing "Improve this map" link to not preload map location #3356
0.25.1 (September 30 2016)
Bugfixes
- Fix bug causing attribution to not be shown #3278
- Fix bug causing exceptions when symbol text has a trailing newline #3281
0.25.0 (September 29 2016)
Breaking Changes
Evented#offnow require two arguments; omitting the second argument in order to unbind all listeners for an event type is no longer supported, as it could cause unintended unbinding of internal listeners.
New Features & Improvements
- Consolidate undocumented data lifecycle events into
dataanddataloadingevents (#3255) - Add
autovalue for style spec properties (#3203)
Bugfixes
- Fix bug causing "Map#queryRenderedFeatures" to return no features after map rotation or filter change (#3233)
- Change webpack build process (#3235) :warning: BREAKING CHANGE :warning:
- Improved error messages for
LngLat#convert(#3232) - Fix bug where the
tilesfield is omitted from theRasterTileSource#serializemethod (#3259) - Comply with HTML spec by replacing the
divwithin theNavigationcontrol<button>with aspanelement (#3268) - Fix bug causing
Markerinstances to be translated to non-whole pixel coordinates that caused blurriness (#3270)
Performance Improvements
- Avoid unnecessary style validation (#3224)
- Share a single blob URL between all workers (#3239)
0.24.0 (September 19 2016)
New Features & Improvements
- Allow querystrings in
mapbox://URLs #3113 - Allow "drag rotate" interaction to control pitch #3105
- Improve performance by decreasing
WorkerscriptBlobsize #3158 - Improve vector tile performance #3067
- Decrease size of distributed library by removing
package.json#3174 - Add support for new lines in
text-field#3179 - Make keyboard navigation smoother #3190
- Make mouse wheel zooming smoother #3189
- Add better error message when calling
Map#queryRenderedFeatureson nonexistent layer #3196 - Add support for imperial units on
Scalecontrol #3160 - Add map's pitch to URL hash #3218
Bugfixes
- Fix exception thrown when using box zoom handler #3078
- Ensure style filters cannot be mutated by reference #3093
- Fix exceptions thrown when opening marker-bound popup by click #3104
- Fix bug causing fills with transparent colors and patterns to not render #3107
- Fix order of latitudes in
Map#getBounds#3081 - Fix incorrect evaluation of zoom-and-property functions #2827 #3155
- Fix incorrect evaluation of property functions #2828 #3155
- Fix bug causing garbled text rendering when multiple maps are rendered on the page #3086
- Fix rendering defects caused by
Map#setFilterand map rotation on iOS 10 #3207 - Fix bug causing image and video sources to disappear when zooming in #3010
0.23.0 (August 25 2016)
New Features & Improvements
- Add support for
line-colorproperty functions #2938 - Add
Scalecontrol #2940 #3042 - Improve polygon label placement by rendering labels at the pole of inaccessability #3038
- Add
Popupoffsetoption #1962 - Add
Marker#bindPopupmethod #3056
Performance Improvements
- Improve performance of pages with multiple maps using a shared
WebWorkerpool #2952
Bugfixes
- Make
LatLngBoundsobey its documented argument order (southwest,northeast), allowing bounds across the dateline #2414 :warning: BREAKING CHANGE :warning: - Fix bug causing
fill-opacityproperty functions to not render as expected #3061
0.22.1 (August 18 2016)
New Features & Improvements
- Reduce library size by using minified version of style specification #2998
- Add a warning when rendering artifacts occur due to too many symbols or glyphs being rendered in a tile #2966
Bugfixes
- Fix bug causing exception to be thrown by
Map#querySourceFeatures#3022 - Fix bug causing
Map#loadedto return true while there are outstanding tile updates #2847
0.22.0 (August 11 2016)
Breaking Changes
- The
GeoJSONSource,VideoSource,ImageSourceconstructors are now private. Please usemap.addSource({...})to create sources andmap.getSource(...).setData(...)to update GeoJSON sources. #2667 Map#onErrorhas been removed. You may catch errors by listening for theerrorevent. If no listeners are bound toerror, error messages will be printed to the console. #2852
New Features & Improvements
- Increase max glyph atlas size to accomodate alphabets with large numbers of characters #2930
- Add support for filtering features on GeoJSON / vector tile
$id#2888 - Update geolocate icon #2973
- Add a
closeevent toPopups #2953 - Add a
offsetoption toMarker#2885 - Print
errorevents without any listeners to the console #2852 - Refactored
Sourceinterface to prepare for custom source types #2667
Bugfixes
- Fix opacity property-functions for fill layers #2971
- Fix
DataCloneErrorin Firefox and IE11 #2559 - Fix bug preventing camera animations from being triggered in
moveendlisteners #2944 - Fix bug preventing
fill-outline-colorfrom being unset #2964 - Fix webpack support #2887
- Prevent buttons in controls from acting like form submit buttons #2935
- Fix bug preventing map interactions near two controls in the same corner #2932
- Fix crash resulting for large style batch queue #2926
0.21.0 (July 13 2016)
Breaking Changes
- GeoJSON polygon inner rings are now rewound for compliance with the v2 vector tile. This may affect some uses of
line-offset, reversing the direction of the offset. #2889
New Features & Improvements
- Add
text-pitch-alignmentstyle property #2668 - Allow query parameters on
mapbox://URLs #2702 - Add
icon-text-fitandicon-text-fit-paddingstyle properties #2720 - Enable property functions for
icon-rotate#2738 - Enable property functions for
fill-opacity#2733 - Fire
Map#mouseoutevents #2777 - Allow query parameters on all sprite URLs #2772
- Increase sprite atlas size to 1024px square, allowing more and larger sprites #2802
- Add
Markerclass #2725 #2810 - Add
{quadkey}URL parameter #2805 - Add
circle-pitch-scalestyle property #2821
Bugfixes
- Fix rendering of layers with large numbers of features #2794
- Fix exceptions thrown during drag-rotate interactions #2840
- Fix error when adding and removing a layer within the same update cycle #2845
- Fix false "Geometry exceeds allowed extent" warnings #2568
- Fix
Map#loadedreturning true while there are outstanding tile updates #2847 - Fix style validation error thrown while removing a filter #2847
- Fix event data object not being passed for double click events #2814
- Fix multipolygons disappearing from map at certain zoom levels #2704
- Fix exceptions caused by
queryRenderedFeaturesin Safari and Firefox #2822 - Fix
mapboxgl#supported()returningtruein old versions of IE11 mapbox/mapbox-gl-supported#1
0.20.1 (June 21 2016)
Bugfixes
- Fixed exception thrown when changing
*-translateproperties viasetPaintProperty(#2762)
0.20.0 (June 10 2016)
New Features & Improvements
- Add limited WMS support #2612
- Add
workerCountconstructor option #2666 - Improve performance of
locationPointandpointLocation#2690 - Remove "Not using VertexArrayObject extension" warning messages #2707
- Add
versionproperty to mapboxgl #2660 - Support property functions in
circle-opacityandcircle-blur#2693
Bugfixes
- Fix exception thrown by "drag rotate" handler #2680
- Return an empty array instead of an empty object from
queryRenderedFeatures#2694 - Fix bug causing map to not render in IE
0.19.1 (June 2 2016)
Bugfixes
- Fix rendering of polygons with more than 35k vertices #2657
0.19.0 (May 31 2016)
New Features & Improvements
- Allow use of special characters in property field names #2547
- Improve rendering speeds on fill layers #1606
- Add data driven styling support for
fill-colorandfill-outline-color#2629 - Add
hasand!hasfilter operators mapbox/feature-filter#15 - Improve keyboard handlers with held-down keys #2530
- Support 'tms' tile scheme #2565
- Add
trackResizeoption toMap#2591
Bugfixes
- Scale circles when map is displayed at a pitch #2541
- Fix background pattern rendering bug #2557
- Fix bug that prevented removal of a
fill-patternfrom a fill layer #2534 - Fix
line-patternandfill-patternrendering #2596 - Fix some platform specific rendering bugs #2553
- Return empty object from
queryRenderedFeaturesbefore the map is loaded #2621 - Fix "there is no texture bound to the unit 1" warnings #2509
- Allow transitioned values to be unset #2561
0.18.0 (April 13 2016)
New Features & Improvements
- Implement zoom-and-property functions for
circle-colorandcircle-size#2454 - Dedupe attributions that are substrings of others #2453
- Misc performance improvements #2483 #2488
Bugfixes
- Fix errors when unsetting and resetting a style property #2464
- Fix errors when updating paint properties while using classes #2496
- Fix errors caused by race condition in unserializeBuckets #2497
- Fix overzoomed tiles in wrapped worlds #2482
- Fix errors caused by mutating a filter object after calling
Map#setFilter#2495
0.17.0 (April 13 2016)
Breaking Changes
- Remove
map.batchin favor of automatically batching style mutations (i.e. calls toMap#setLayoutProperty,Map#setPaintProperty,Map#setFilter,Map#setClasses, etc.) and applying them once per frame, significantly improving performance when updating the style frequently #2355 #2380 - Remove
util.throttle#2345
New Features & Improvements
- Improve performance of all style mutation methods by only recalculating affected properties #2339
- Improve fading of labels and icons #2376
- Improve rendering performance by reducing work done on the main thread #2394
- Validate filters passed to
Map#queryRenderedFeaturesandMap#querySourceFeatures#2349 - Display a warning if a vector tile's geometry extent is larger than supported #2383
- Implement property functions (i.e. data-driven styling) for
circle-colorandcircle-size#1932 - Add
Popup#setDOMContentmethod #2436
Bugfixes
- Fix a performance regression caused by using 1
WebWorkerinstead of# cpus - 1WebWorkers, slowing down tile loading times #2408 - Fix a bug in which
Map#queryRenderedFeatureswould sometimes return features that had been removed #2353 - Fix
clusterMaxZoomoption onGeoJSONSourcenot working as expected #2374 - Fix anti-aliased rendering for pattern fills #2372
- Fix exception caused by calling
Map#queryRenderedFeaturesorMap#querySourceFeatureswith no arguments - Fix exception caused by calling
Map#setLayoutPropertyfortext-fieldoricon-image#2407
0.16.0 (March 24 2016)
Breaking Changes
- Replace
Map#featuresAtandMap#featuresInwithMap#queryRenderedFeaturesandmap.querySourceFeatures(#2224)- Replace
featuresAtandfeaturesInwithqueryRenderedFeatures - Make
queryRenderedFeaturessynchronous, remove the callback and use the return value. - Rename
layerparameter tolayersand make it an array of layer names. - Remove the
radiusparameter.radiuswas used withfeaturesAtto account for style properties likeline-widthandcircle-radius.queryRenderedFeaturesaccounts for these style properties. If you need to query a larger area, use a bounding box query instead of a point query. - Remove the
includeGeometryparameter becausequeryRenderedFeaturesalways includes geometries.
- Replace
Map#debugis renamed toMap#showTileBoundaries(#2284)Map#collisionDebugis renamed toMap#showCollisionBoxes(#2284)
New Features & Improvements
- Improve overall rendering performance. (#2221)
- Improve performance of
GeoJSONSource#setData. (#2222) - Add
Map#setMaxBoundsmethod (#2234) - Add
isActiveandisEnabledmethods to interaction handlers (#2238) - Add
Map#setZoomBoundsmethod (#2243) - Add touch events (#2195)
- Add
map.queryRenderedFeaturesto query the styled and rendered representations of features (#2224) - Add
map.querySourceFeaturesto get features directly from vector tiles, independent of the style (#2224) - Add
mapboxgl.Geolocatecontrol (#1939) - Make background patterns render seamlessly across tile boundaries (#2305)
Bugfixes
- Fix calls to
setFilter,setLayoutProperty, andsetLayerZoomRangeon ref children (#2228) - Fix
undefinedbucket errors aftersetFiltercalls (#2244) - Fix bugs causing hidden symbols to be rendered (#2246, #2276)
- Fix raster flickering (#2236)
- Fix
queryRenderedFeaturesprecision at high zoom levels (#2292) - Fix holes in GeoJSON data caused by unexpected winding order (#2285)
- Fix bug causing deleted features to be returned by
queryRenderedFeatures(#2306) - Fix bug causing unexpected fill patterns to be rendered (#2307)
- Fix popup location with preceding sibling elements (#2311)
- Fix polygon anti-aliasing (#2319)
- Fix slivers between non-adjacent polygons (#2319)
- Fix keyboard shortcuts causing page to scroll (#2312)
0.15.0 (March 1 2016)
New Features & Improvements
- Add
ImageSource#setCoordinatesandVideoSource#setCoordinates(#2184)
Bugfixes
- Fix flickering on raster layers (#2211)
- Fix browser hang when zooming quickly on raster layers (#2211)
0.14.3 (Feb 25 2016)
New Features & Improvements
- Improve responsiveness of zooming out by using cached parent tiles (#2168)
- Improve contextual clues on style API validation (#2170)
- Improve performance of methods including
setData(#2174)
Bugfixes
- Fix incorrectly sized line dashes (#2099)
- Fix bug in which
infeature filter drops features (#2166) - Fix bug preventing
Map#loadfrom firing when tile "Not Found" errors occured (#2176) - Fix rendering artifacts on mobile GPUs (#2117)
0.14.2 (Feb 19 2016)
Bugfixes
- Look for loaded parent tiles in cache
- Set tile cache size based on viewport size (#2137)
- Fix tile render order for layer-by-layer
- Remove source update throttling (#2139)
- Make panning while zooming more linear (#2070)
- Round points created during bucket creation (#2067)
- Correct bounds for a rotated or tilted map (#1842)
- Fix overscaled featuresAt (#2103)
- Allow using
tileSize: 512as a switch to trade retina support for 512px raster tiles - Fix the serialization of paint classes (#2107)
- Fixed bug where unsetting style properties could mutate the value of other style properties (#2105)
- Less slanted dashed lines near sharp corners (#967)
- Fire map#load if no initial style is set (#2042)
0.14.1 (Feb 10 2016)
Bugfixes
- Fix incorrectly rotated symbols along lines near tile boundries (#2062)
- Fix broken rendering when a fill layer follows certain symbol layers (#2092)
0.14.0 (Feb 8 2016)
Breaking Changes
- Switch
GeoJSONSourceclustering options from being measured in extent-units to pixels (#2026)
New Features & Improvements
- Improved error message for invalid colors (#2006)
- Added support for tiles with variable extents (#2010)
- Improved
filterperformance and maximum size (#2024) - Changed circle rendering such that all geometry nodes are drawn, not just the geometry's outer ring (#2027)
- Added
Map#getStylemethod (#1982)
Bugfixes
- Fixed bug causing WebGL contexts to be "used up" by calling
mapboxgl.supported()(#2018) - Fixed non-deterministic symbol z-order sorting (#2023)
- Fixed garbled labels while zooming (#2012)
- Fixed icon jumping when touching trackpad with two fingers (#1990)
- Fixed overzoomed collision debug labels (#2033)
- Fixed dashes sliding along their line during zooming (#2039)
- Fixed overscaled
minzoomsetting for GeoJSON sources (#1651) - Fixed overly-strict function validation for duplicate stops (#2075)
- Fixed crash due to
performance.nownot being present on some browsers (#2056) - Fixed the unsetting of paint properties (#2037)
- Fixed bug causing multiple interaction handler event listeners to be attached (#2069)
- Fixed bug causing only a single debug box to be drawn (#2034)
0.13.1 (Jan 27 2016)
Bugfixes
- Fixed broken npm package due to outdated bundled modules
0.13.0 (Jan 27 2016)
Bugfixes
- Fixed easeTo pan, zoom, and rotate when initial rotation != 0 (#1950)
- Fixed rendering of tiles with an extent != 4096 (#1952)
- Fixed missing icon collision boxes (#1978)
- Fixed null
Tile#bufferserrors (#1987)
New Features & Improvements
- Added
symbol-avoid-edgesstyle property (#1951) - Improved
symbol-max-anglecheck algorithm (#1959) - Added marker clustering! (#1931)
- Added zoomstart, zoom, and zoomend events (#1958)
- Disabled drag on mousedown when using boxzoom (#1907)
0.12.4 (Jan 19 2016)
Bugfixes
- Fix elementGroups null value errors (#1933)
- Fix some glyph atlas overflow cases (#1923)
0.12.3 (Jan 14 2016)
API Improvements
- Support inline attribution options in map options (#1865)
- Improve flyTo options (#1854, #1429)
Bugfixes
- Fix flickering with overscaled tiles (#1921)
- Remove Node.remove calls for IE browser compatibility (#1900)
- Match patterns at tile boundaries (#1908)
- Fix Tile#positionAt, fix query tests (#1899)
- Fix flickering on streets (#1875)
- Fix text-max-angle property (#1870)
- Fix overscaled line patterns (#1856)
- Fix patterns and icons for mismatched pixelRatios (#1851)
- Fix missing labels when text size 0 at max zoom (#1809)
- Use linear interp when pixel ratios don't match (#1601)
- Fix blank areas, flickering in raster layers (#1876, #675)
- Fix labels slipping/cropping at tile bounds (#757)
UX Improvements
- Improve touch handler perceived performance (#1844)
0.12.2 (Dec 22 2015)
API Improvements
- Support LngLat.convert([w, s, e, n]) (#1812)
- Invalid GeoJSON is now handled better
Bugfixes
- Fixed
Popup#addTowhen the popup is already open (#1811) - Fixed warping when rotating / zooming really fast
Map#flyTonow flies across the antimeridan if shorter (#1853)
0.12.1 (Dec 8 2015)
Breaking changes
- Reversed the direction of
line-offset(#1808) - Renamed
Pinchinteraction handler toTouchZoomRotate(#1777) - Made
Map#updateandMap#renderprivate methods (#1798) - Made
Map#removeremove created DOM elements (#1789)
API Improvements
- Added an method to disable touch rotation (#1777)
- Added a
positionoption forAttribution(#1689)
Bugfixes
- Ensure tile loading errors are properly reported (#1799)
- Ensure re-adding a previously removed pop-up works (#1477)
UX Improvements
- Don't round zoom level during double-click interaction (#1640)
0.12.0 (Dec 2 2015)
API Improvements
- Added
line-offsetstyle property (#1778)
0.11.5 (Dec 1 2015)
Bugfixes
- Fixed unstable symbol layer render order when adding / removing layers (#1558)
- Fire map loaded event even if raster tiles have errors
- Fix panning animation during easeTo with zoom change
- Fix pitching animation during flyTo
- Fix pitching animation during easeTo
- Prevent rotation from firing
mouseendevents (#1104)
API Improvements
- Fire
mousedownandmouseupevents (#1411) - Fire
movestartandmoveendwhen panning (#1658) - Added drag events (#1442)
- Request webp images for mapbox:// raster tiles in chrome (#1725)
UX Improvements
- Added inertia to map rotation (#620)
0.11.4 (Nov 16 2015)
Bugfixes
- Fix alpha blending of alpha layers (#1684)
0.11.3 (Nov 10 2015)
Bugfixes
- Fix GeoJSON rendering and performance (#1685)
UX Improvements
- Use SVG assets for UI controls (#1657)
- Zoom out with shift + dblclick (#1666)
0.11.2 (Oct 29 2015)
- Misc performance improvements
Bugfixes
- Fix sprites on systems with non-integer
devicePixelRatios (#1029 #1475 #1476) - Fix layer minZoom being ignored if not less than source maxZoom
- Fix symbol placement at the start of a line (#1461)
- Fix
raster-opacityon non-tile sources (#1270) - Ignore boxzoom on shift-click (#1655)
UX Improvements
- Enable line breaks on common punctuation (#1115)
API Improvements
- Add toString and toArray methods to LngLat, LngLatBounds (#1571)
- Add
Transform#resizemethod - Add
Map#getLayermethod (#1183) - Add
Transform#unmodifiedproperty (#1452) - Propagate WebGL context events (#1612)
0.11.1 (Sep 30 2015)
Bugfixes
- Add statistics and checkboxes to debug page
- Fix
Map#featuresAtfor non-4096 vector sources (#1529) - Don't fire
mousemoveon drag-pan - Fix maxBounds constrains (#1539)
- Fix maxBounds infinite loop (#1538)
- Fix memory leak in worker
- Assert valid
TileCoord, fix wrap calculation inTileCoord#cover(#1483) - Abort raster tile load if not in viewport (#1490)
API Improvements
- Add
Mapevent listeners formouseup,contextmenu(right click) (#1532)
0.11.0 (Sep 11 2015)
API Improvements
- Add
Map#featuresIn: a bounding-box feature query - Emit stylesheet validation errors (#1436)
UX Improvements
- Handle v8 style
center,zoom,bearing,pitch(#1452) - Improve circle type styling (#1446)
- Improve dashed and patterned line antialiasing
Bugfixes
- Load images in a way that respects Cache-Control headers
- Filter for rtree matches to those crossing bbox
- Log errors by default (#1463)
- Fixed modification of
text-sizeviasetLayoutProperty(#1451) - Throw on lat > 90 || < -90. (#1443)
- Fix circle clipping bug (#1457)
0.10.0 (Aug 21 2015)
Breaking changes
-
Switched to [longitude, latitude] coordinate order, matching GeoJSON. We anticipate that mapbox-gl-js will be widely used with GeoJSON, and in the long term having a coordinate order that is consistent with GeoJSON will lead to less confusion and impedance mismatch than will a [latitude, longitude] order.
The following APIs were renamed:
LatLngwas renamed toLngLatLatLngBoundswas renamed toLngLatBoundsPopup#setLatLngwas renamed toPopup#setLngLatPopup#getLatLngwas renamed toPopup#getLngLat- The
latLngproperty of Map events was renamedlngLat
The following APIs now expect array coordinates in [longitude, latitude] order:
LngLat.convertLngLatBounds.convertPopup#setLngLat- The
centerandmaxBoundsoptions of theMapconstructor - The arguments to
Map#setCenter,Map#fitBounds,Map#panTo, andMap#project - The
centeroption ofMap#jumpTo,Map#easeTo, andMap#flyTo - The
aroundoption ofMap#zoomTo,Map#rotateTo, andMap#easeTo - The
coordinatesproperties of video and image sources
-
Updated to mapbox-gl-style-spec v8.0.0 (Changelog). Styles are now expected to be version 8. You can use the gl-style-migrate utility to update existing styles.
-
The format for
mapbox://style and glyphs URLs has changed. For style URLs, you should now use the formatmapbox://styles/:username/:style. The:styleportion of the URL no longer contains a username. For font URLs, you should now use the formatmapbox://fonts/:username/{fontstack}/{range}.pbf. -
Mapbox default styles are now hosted via the Styles API rather than www.mapbox.com. You can make use of the Styles API with a
mapbox://style URL pointing to a v8 style, e.g.mapbox://styles/mapbox/streets-v8. -
The v8 satellite style (
mapbox://styles/mapbox/satellite-v8) is now a plain satellite style, and not longer supports labels or contour lines via classes. For a labeled satellite style, usemapbox://styles/mapbox/satellite-hybrid. -
Removed
mbgl.config.HTTP_URLandmbgl.config.FORCE_HTTPS; https is always used when connecting to the Mapbox API. -
Renamed
mbgl.config.HTTPS_URLtombgl.config.API_URL.
Bugfixes
- Don't draw halo when halo-width is 0 (#1381)
- Reverted shader changes that degraded performance on IE
API Improvements
- You can now unset layout and paint properties via the
setLayoutPropertyandsetPaintPropertyAPIs by passingundefinedas a property value. - The
layeroption offeaturesAtnow supports an array of layers.
0.9.0 (Jul 29 2015)
-
glyphsURL now normalizes without the/v4/prefix formapbox://urls. Legacy behavior formapbox://fontstacksis still maintained (#1385) -
Expose
geojson-vtoptions for GeoJSON sources (#1271) -
bearing snaps to "North" within a tolerance of 7 degrees (#1059)
-
Now you can directly mutate the minzoom and maxzoom layer properties with
map.setLayerZoomRange(layerId, minzoom, maxzoom) -
Exposed
mapboxgl.Control, a base class used by all UI controls -
Refactored handlers to be individually included in Map options, or enable/disable them individually at runtime, e.g.
map.scrollZoom.disable(). -
New feature: Batch operations can now be done at once, improving performance for calling multiple style functions: (#1352)
style.batch(function(s) { s.addLayer({ id: 'first', type: 'symbol', source: 'streets' }); s.addLayer({ id: 'second', type: 'symbol', source: 'streets' }); s.addLayer({ id: 'third', type: 'symbol', source: 'terrain' }); s.setPaintProperty('first', 'text-color', 'black'); s.setPaintProperty('first', 'text-halo-color', 'white'); }); -
Improved documentation
-
featuresAtperformance improvements by exposingincludeGeometryoption -
Better label placement along lines (#1283)
-
Improvements to round linejoins on semi-transparent lines (mapbox/mapbox-gl-native#1771)
-
Round zoom levels for raster tile loading (2a2aec)
-
Source#reload cannot be called if source is not loaded (#1198)
-
Events bubble to the canvas container for custom overlays (#1301)
-
Move handlers are now bound on mousedown and touchstart events
-
map.featuresAt() now works across the dateline
0.8.1 (Jun 16 2015)
- No code changes; released only to correct a build issue in 0.8.0.
0.8.0 (Jun 15 2015)
Breaking changes
-
map.setView(latlng, zoom, bearing)has been removed. Usemap.jumpTo(options)instead:map.setView([40, -74.50], 9) // 0.7.0 or earlier map.jumpTo({center: [40, -74.50], zoom: 9}); // now -
map.easeToandmap.flyTonow accept a single options object rather than positional parameters:map.easeTo([40, -74.50], 9, null, {duration: 400}); // 0.7.0 or earlier map.easeTo({center: [40, -74.50], zoom: 9, duration: 400}); // now -
mapboxgl.Sourceis no longer exported. Usemap.addSource()instead. See the GeoJSON line or GeoJSON markers examples. -
mapboxgl.util.supported()moved tomapboxgl.supported().
UX improvements
- Add perspective rendering (#1049)
- Better and faster labelling (#1079)
- Add touch interactions support on mobile devices (#949)
- Viewport-relative popup arrows (#1065)
- Normalize mousewheel zooming speed (#1060)
- Add proper handling of GeoJSON features that cross the date line (#1275)
- Sort overlapping symbols in the y direction (#470)
- Control buttons are now on a 30 pixel grid (#1143)
- Improve GeoJSON processing performance
API Improvements
- Switch to JSDoc for documentation
- Bundling with browserify is now supported
- Validate incoming map styles (#1054)
- Add
MapsetPitchgetPitch - Add
Mapdblclickevent. (#1168) - Add
MapgetSource(660a8c1) - Add
MapsetFilterandgetFilter(#985) - Add
MapfailIfMajorPerformanceCaveatoption (#1082) - Add
MappreserveDrawingBufferoption (#1232) - Add
VideoSourcegetVideo()(#1162) - Support vector tiles with extents other than 4096 (#1227)
- Use a DOM hierarchy that supports evented overlays (#1217)
- Pass
latLngto the event object (#1068)
UX Bugfixes
- Fix rendering glitch on iOS 8 (#750)
- Fix line triangulation errors (#1120, #992)
- Support unicode range 65280-65535 (#1108)
- Fix cracks between fill patterns (#972)
- Fix angle of icons aligned with lines (37a498a)
- Fix dashed line bug for overscaled tiles (#1132)
- Fix icon artifacts caused by sprite neighbors (#1195)
API Bugfixes
- Don't fire spurious
moveendevents on mouseup (#1107) - Fix a race condition in
featuresAt(#1220) - Fix for brittle fontstack name convention (#1070)
- Fix broken
PopupsetHTML(#1272) - Fix an issue with cross-origin image requests (#1269)
0.7.0 (Mar 3 2015)
Breaking
- Rename
Maphoverevent tomousemove. - Change
featuresAtto return GeoJSON objects, including geometry (#1010) - Remove
Mapcanvasandcontainerproperties, addgetCanvasandgetContainermethods instead
UX Improvements
- Improve line label density
- Add boxzoom interaction (#1038)
- Add keyboard interaction (#1034)
- Faster
GeoJSONSourcesetDatawithout flickering (#973)
API Improvements
- Add Popup component (#325)
- Add layer API (#1022)
- Add filter API (#985)
- More efficient filter API (#1018)
- Accept plain old JS object for
addSource(#1021) - Reparse overscaled tiles
Bugfixes
- Fix
featuresAtfor LineStrings (#1006) - Fix
tileSizeargument toGeoJSONworker (#987) - Remove extraneous files from the npm package (#1024)
- Hide "improve map" link in print (#988)
0.6.0 (Feb 9 2015)
Bugfixes
- Add wrapped padding to sprite for repeating images (#972)
- Clear color buffers before rendering (#966)
- Make line-opacity work with line-image (#970)
- event.toElement fallback for Firefox (#932)
- skip duplicate vertices at ends of lines (#776)
- allow characters outside \w to be used in token
- Clear old tiles when new GeoJSON is loaded (#905)
Improvements
- Added
map.setPaintProperty(),map.getPaintProperty(),map.setLayoutProperty(), andmap.getLayoutProperty(). - Switch to ESLint and more strict code rules (#957)
- Grab 2x raster tiles if retina (#754)
- Support for mapbox:// style URLs (#875)
Breaking
- Updated to mapbox-gl-style-spec v7.0.0 (Changelog). Styles are now expected to be version 7. You can use the gl-style-migrate utility to update existing styles.
- HTTP_URL and HTTPS_URL config options must no longer include a
/v4path prefix. addClass,removeClass,setClasses,hasClass, andgetClassesare now methods on Map.Style#cascadeis now private, pending a public style mutation API (#755).- The format for
featuresAtresults changed. Instead of result-per-geometry-cross-layer, each result has alayersarray with all layers that contain the feature. This avoids duplication of geometry and properties in the result set.
0.5.2 (Jan 07 2015)
Bugfixes
- Remove tiles for unused sources (#863)
- Fix fill pattern alignment
Improvements
- Add GeoJSONSource maxzoom option (#760)
- Return ref layers in featuresAt (#847)
- Return any extra layer keys provided in the stylesheet in featuresAt
- Faster protobuf parsing
0.5.1 (Dec 19 2014)
Bugfixes
- Fix race conditions with style loading/rendering
- Fix race conditions with setStyle
- Fix map.remove()
- Fix featuresAt properties
0.5.0 (Dec 17 2014)
Bugfixes
- Fix multiple calls to setStyle
Improvements
featuresAtnow returns additional information- Complete style/source/tile event suite: style.load, style.error, style.change, source.add, source.remove, source.load, source.error, source.change, tile.add, tile.remove, tile.load, tile.error
- Vastly improved performance and correctness for GeoJSON sources
- Map#setStyle accepts a style URL
- Support {prefix} in tile URL templates
- Provide a source map with minified source
Breaking
- Results format for
featuresAtchanged
0.4.2 (Nov 14 2014)
Bugfixes
- Ensure only one easing is active at a time (#807)
- Don't require style to perform easings (#817)
- Fix raster tiles sometimes not showing up (#761)
Improvements
- Internet Explorer 11 support (experimental)
0.4.1 (Nov 10 2014)
Bugfixes
- Interpolate to the closest bearing when doing rotation animations (#818)
0.4.0 (Nov 4 2014)
Breaking
- Updated to mapbox-gl-style-spec v6.0.0 (Changelog). Styles are now expected to be version 6. You can use the gl-style-migrate utility to update existing styles.
0.3.2 (Oct 23 2014)
Bugfixes
- Fix worker initialization with deferred or async scripts
Improvements
- Added map.remove()
- CDN assets are now served with gzip compression
0.3.1 (Oct 06 2014)
Bugfixes
- Fixed iteration over arrays with for/in
- Made browserify deps non-dev (#752)
0.3.0 (Sep 23 2014)
Breaking
- Updated to mapbox-gl-style-spec v0.0.5 (Changelog). Styles are now expected to be version 5. You can use the gl-style-migrate utility to update existing styles.
- Removed support for composite layers for performance reasons. #523
raster-hue-rotateunits are now degrees.
Improvements
- Added LatLng#wrap
- Added support for Mapbox fontstack API.
- Added support for remote, non-Mapbox TileJSON sources and inline TileJSON sources (#535, #698).
- Added support for
symbol-avoid-edgesproperty to allow labels to be placed across tile edges. - Fixed mkdir issue on Windows (#674).
- Fixed drawing beveled line joins without overlap.
Bugfixes
- Fixed performance when underzooming a layer's minzoom.
- Fixed
raster-opacityfor regular raster layers. - Fixed various corner cases of easing functions.
- Do not modify original stylesheet (#728).
- Inherit video source from source (#699).
- Fixed interactivity for geojson layers.
- Stop dblclick on navigation so the map does not pan (#715).
0.2.2 (Aug 12 2014)
Breaking
map.setBearing()no longer supports a second argument. Usemap.rotateTowith anoffsetoption and duration 0 if you need to rotate around a point other than the map center.
Improvements
- Improved
GeoJSONSourceto also accept URL asdataoption, eliminating a huge performance bottleneck in case of large GeoJSON files. #669 #671 - Switched to a different fill outlines rendering approach. #668
- Made the minified build 12% smaller gzipped (66 KB now).
- Added
aroundoption toMapzoomTo/rotateTo. - Made the permalink hash more compact.
- Bevel linejoins no longer overlap and look much better when drawn with transparency.
Bugfixes
- Fixed the broken minified build. #679
- Fixed blurry icons rendering. #666
- Fixed
util.supportsWebGL detection producing false positives in some cases. #677 - Fixed invalid font configuration completely blocking tile rendering. #662
- Fixed
Mapproject/unprojectto properly accept array-form values. - Fixed sprite loading race condition. #593
- Fixed
GeoJSONSourcesetDatanot updating the map until zoomed or panned. #676
0.2.1 (Aug 8 2014)
Breaking
- Changed
Navigationcontrol signature: now it doesn't needmapin constructor and gets added withmap.addControl(nav)ornav.addTo(map). - Updated CSS classes to have consistent naming prefixed with
mapboxgl-.
Improvements
- Added attribution control (present by default, disable by passing
attributionControl: falsein options). - Added rotation by dragging the compass control.
- Added grabbing cursors for the map by default.
- Added
util.inheritandutil.debouncefunctions. - Changed the default debug page style to OSM Bright.
- Token replacements now support dashes.
- Improved navigation control design.
Bugfixes
- Fixed compass control to rotate its icon with the map.
- Fixed navigation control cursors.
- Fixed inertia going to the wrong direction in a rotated map.
- Fixed inertia race condition where error was sometimes thrown after erratic panning/zooming.
0.2.0 (Aug 6 2014)
- First public release.