Packages

mapbox-gl

3.34.2 · 3 Nov 2026SEE LICENSE IN LICENSE.txt6M / weekRepositoryHomepagenpmAtom feed

Your version

1.6.0

4 Dec 2019Where it was published

1.13.3 is the newest release of 1.x.

In short

15 new13 fixed

Release note

Features

  • Add ability to insert images into text labels using an image expression within a format expression: "text-field": ["format", "Some text", ["image", "my-image"], "some more text"]

  • Add support for stretchable images (aka nine-part or nine-patch images). Stretchable images can be used with icon-text-fit to draw resized images with unstretched corners and borders.

  • Add in expression. It can check if a value is in an array (["in", value, array]) or a substring is in a string (["in", substring, string])

  • Add minPitch and maxPitch map options

  • Add rotation, rotationAlignment and pitchAlignment options 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)

  • Add ability to localize mapbox UI controls (#8095) (h/t dmytro-gokun)

  • Add LatLngBounds.contains() method (#7512, fixed by #8200)

  • Add option to load rtl-text-plugin lazily

  • Add essential parameter to AnimationOptions that can override prefers-reduced-motion: reduce (#8743, fixed by #8883)

Improvements

  • Allow rendering full world smaller than 512px. To restore the previous limit call map.setMinZoom(0)

  • Add an es modules build of for mapbox-gl-style-spec in dist/ (#8247) (h/t ahocevar)

  • Add 'image/webp,/' accept header to fetch/ajax image requests when webp supported

  • Improve documentation for setStyle, getStyle, and isStyleLoaded

Bug Fixes

  • Fix map rendering after addImage and removeImage are used to change a used image

  • Fix visibility of controls in High Contrast mode in IE

  • 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

  • Fix Failed to execute 'shaderSource' on 'WebGLRenderingContext' errors

  • Make expression validation fail on NaN

  • Fix setLayerZoomRange bug that caused tiles to be re-requested (#7865, fixed by #8854)

  • Fix map.showTileBoundaries rendering

  • Fix using generateId in conjunction with cluster in a GeoJSONSource (#8223, fixed by #8945)

  • Fix opening popup on a marker from keyboard

  • Fix error thrown when request aborted (#7614, fixed by #9021)

  • Fix attribution control when repeatedly removing and adding it