mapbox-gl
3.34.2 · 3 Nov 2026SEE LICENSE IN LICENSE.txt6M / weekRepositoryHomepagenpmAtom feed
197 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 0.25.x
0.25.0
29 Sep 2016- breaking
Change webpack build process (#3235) :warning: warning:
Consolidate undocumented data lifecycle events into
dataanddataloadingeventsAdd
autovalue for style spec properties
New Features & Improvements
Consolidate undocumented data lifecycle events into
dataanddataloadingeventsAdd
autovalue for style spec properties
Bugfixes
Fix bug causing "Map#queryRenderedFeatures" to return no features after map rotation or filter change
- breaking
Change webpack build process (#3235) :warning: warning:
Improved error messages for
LngLat#convertFix bug where the
tilesfield is omitted from theRasterTileSource#serializemethodComply with HTML spec by replacing the
divwithin theNavigationcontrolbuttonwith aspanelementFix bug causing
Markerinstances to be translated to non-whole pixel coordinates that caused blurriness
Performance Improvements
Avoid unnecessary style validation
Share a single blob URL between all workers
- 0.24.x
0.24.0
20 Sep 2016Allow querystrings in
mapbox://URLs #3113Allow "drag rotate" interaction to control pitch #3105
Improve performance by decreasing
WorkerscriptBlobsize #3158
New Features & Improvements
Allow querystrings in
mapbox://URLs #3113Allow "drag rotate" interaction to control pitch #3105
Improve performance by decreasing
WorkerscriptBlobsize #3158Improve vector tile performance #3067
Decrease size of distributed library by removing
package.json#3174Add support for new lines in
text-field#3179Make keyboard navigation smoother #3190
Make mouse wheel zooming smoother #3189
Add better error message when calling
Map#queryRenderedFeatureson nonexistent layer #3196Add support for imperial units on
Scalecontrol #3160Add 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#3081Fix incorrect evaluation of zoom-and-property functions #2827 #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 #3207Fix bug causing image and video sources to disappear when zooming
- 0.23.x
0.23.0
25 Aug 2016- breaking
Make
LngLatBoundsobey its documented argument order (southwest,northeast), allowing bounds across the dateline #2414 :warning: warning: Add support for
line-colorproperty functions #2938
New Features & Improvements
Add support for
line-colorproperty functions #2938Improve polygon label placement by rendering labels at the pole of inaccessability #3038
Add
offsetoption toPopup#1962Add
Marker#bindPopupmethod #3056
Performance Improvements
Improve performance of pages with multiple maps using a shared
WebWorkerpool #2952
Bugfixes
- 0.22.x
0.22.1
18 Aug 20160.22.0
12 Aug 2016- breaking
The
GeoJSONSource,VideoSource,ImageSourceconstructors are now private. Please usemap.addSource({...})to create sources andmap.getSource(...).setData(...)to update GeoJSON sources. #2667 - breaking
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 Increase max glyph atlas size to accomodate alphabets with large numbers of characters #2930
Breaking Changes
- breaking
The
GeoJSONSource,VideoSource,ImageSourceconstructors are now private. Please usemap.addSource({...})to create sources andmap.getSource(...).setData(...)to update GeoJSON sources. #2667 - breaking
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#2888Update geolocate icon #2973
Add a
closeevent toPopups #2953Add a
offsetoption toMarker#2885Print
errorevents without any listeners to the console #2852Refactored
Sourceinterface to prepare for custom source types #2667
Bugfixes
Fix opacity property-functions for fill layers #2971
Fix
DataCloneErrorin Firefox and IE11 #2559Fix bug preventing camera animations from being triggered in
moveendlisteners #2944Fix bug preventing
fill-outline-colorfrom being unset #2964Fix 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.x
0.21.0
13 Jul 2016Add
text-pitch-alignmentstyle property #2668Allow query parameters on
mapbox://URLs #2702Add
icon-text-fitandicon-text-fit-paddingstyle properties #2720
New Features & Improvements
Add
text-pitch-alignmentstyle property #2668Allow query parameters on
mapbox://URLs #2702Add
icon-text-fitandicon-text-fit-paddingstyle properties #2720Enable property functions for
icon-rotate#2738Enable property functions for
fill-opacity#2733Fire
Map#mouseoutevents #2777Allow query parameters on all sprite URLs #2772
Increase sprite atlas size from 512px to 1024px square, allowing more and larger sprites #2802
Add
{quadkey}URL parameter #2805Add
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 #2847Fix 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 #2822Fix
mapboxgl#supported()returningtruein old versions of IE11 mapbox/mapbox-gl-supported#1
- 0.20.x
0.20.1
21 Jun 2016Fixed exception thrown when changing
*-translateproperties viasetPaintProperty
0.20.0
10 Jun 2016Add limited WMS support #2612
Add
workerCountconstructor option #2666Improve performance of
locationPointandpointLocation#2690
New Features & Improvements
Add limited WMS support #2612
Add
workerCountconstructor option #2666Improve performance of
locationPointandpointLocation#2690Remove "Not using VertexArrayObject extension" warning messages #2707
Add
versionproperty to mapboxgl #2660Support property functions in
circle-opacityandcircle-blur#2693
Bugfixes
- 0.19.x
0.19.0
31 May 2016Significantly improve rendering performance for fill layers #1606
Add data driven styling support for
fill-colorandfill-outline-color#2629Allow use of special characters in property field names #2547
New Features & Improvements
Significantly improve rendering performance for fill layers #1606
Add data driven styling support for
fill-colorandfill-outline-color#2629Allow use of special characters in property field names #2547
Add
hasand!hasfilter operators mapbox/feature-filter#15Improve 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 #2534Fix
line-patternandfill-patternrendering #2596Fix some platform specific rendering bugs #2553
Return empty object from
queryRenderedFeaturesbefore the map is loaded #2621Fix "there is no texture bound to the unit 1" warnings #2509
Allow transitioned values to be unset #2561
- 0.18.x
0.18.0
28 Apr 2016Implement zoom-and-property functions for circle-color and circle-size #2454
Dedupe attributions that are substrings of others #2453
New Features & Improvements
Implement zoom-and-property functions for circle-color and circle-size #2454
Dedupe attributions that are substrings of others #2453
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.x
0.17.0
13 Apr 2016- breaking
Remove
util.throttle#2345 Improve performance of all style mutation methods by only recalculating affected properties #2339
Breaking Changes
- breaking
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 - breaking
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#2349Display 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#1932Add
Popup#setDOMContentmethod #2436
Bugfixes
Fix a performance regression caused by using 1
WebWorkerinstead of# cpus - 1WebWorkers, slowing down tile loading times #2408Fix a bug in which
Map#queryRenderedFeatureswould sometimes return features that had been removed #2353Fix
clusterMaxZoomoption onGeoJSONSourcenot working as expected #2374Fix anti-aliased rendering for pattern fills #2372
Fix exception caused by calling
Map#queryRenderedFeaturesorMap#querySourceFeatureswith no argumentsFix exception caused by calling
Map#setLayoutPropertyfortext-fieldoricon-image#2407
- 0.16.x
0.16.0
24 Mar 2016- breaking
Replace
Map#featuresAtandMap#featuresInwithMap#queryRenderedFeaturesandmap.querySourceFeatures - breaking
Map#debugis renamed toMap#showTileBoundaries - breaking
Map#collisionDebugis renamed toMap#showCollisionBoxes
Breaking Changes
- breaking
Replace
Map#featuresAtandMap#featuresInwithMap#queryRenderedFeaturesandmap.querySourceFeaturesReplace
featuresAtandfeaturesInwithqueryRenderedFeaturesMake
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.
- breaking
Map#debugis renamed toMap#showTileBoundaries - breaking
Map#collisionDebugis renamed toMap#showCollisionBoxes
New Features & Improvements
Improve overall rendering performance.
Improve performance of
GeoJSONSource#setData.Add
Map#setMaxBoundsmethodAdd
isActiveandisEnabledmethods to interaction handlersAdd
Map#setZoomBoundsmethodAdd touch events
Add
map.queryRenderedFeaturesto query the styled and rendered representations of featuresAdd
map.querySourceFeaturesto get features directly from vector tiles, independent of the styleAdd
mapboxgl.GeolocatecontrolMake background patterns render seamlessly across tile boundaries
Bugfixes
Fix calls to
setFilter,setLayoutProperty, andsetLayerZoomRangeon ref childrenFix
undefinedbucket errors aftersetFiltercallsFix bugs causing hidden symbols to be rendered (#2246, #2276)
Fix raster flickering
Fix
queryRenderedFeaturesprecision at high zoom levelsFix holes in GeoJSON data caused by unexpected winding order
Fix bug causing deleted features to be returned by
queryRenderedFeaturesFix bug causing unexpected fill patterns to be rendered
Fix popup location with preceding sibling elements
Fix polygon anti-aliasing
Fix slivers between non-adjacent polygons
Fix keyboard shortcuts causing page to scroll
- 0.15.x
- 0.14.x
0.14.3
26 Feb 2016Improve responsiveness of zooming out by using cached parent tiles (#2168)
Improve contextual clues on style API validation (#2170)
Improve performance ofsetFilter,setLayoutPropertyandsetLayerZoomRangemethods (#2174)New Features & Improvements
Improve responsiveness of zooming out by using cached parent tiles (#2168)
Improve contextual clues on style API validation (#2170)
Improve performance ofsetFilter,setLayoutPropertyandsetLayerZoomRangemethods (#2174)Bugfixes
Fix incorrectly sized line dashes (#2099)
Fix bug in whichinfeature filter drops features (#2166)
Fix bug preventingMap#loadfrom firing when tile "Not Found" errors occured (#2176)
Fix rendering artifacts on mobile GPUs (#2117)0.14.2
20 Feb 2016Look 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 usingtileSize: 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.0
9 Feb 2016Switch
GeoJSONSourceclustering options from being measured in extent-units to pixels (#2026)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)
Improvedfilterperformance and maximum size (#2024)
Changed circle rendering such that all geometry nodes are drawn, not just the geometry's outer ring (#2027)
AddedMap#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 overscaledminzoomsetting for GeoJSON sources (#1651)
Fixed overly-strict function validation for duplicate stops (#2075)
Fixed crash due toperformance.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.x
0.13.1
28 Jan 2016Fixed broken npm package due to outdated bundled modules
0.13.0
27 Jan 2016Fixed 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 nullTile#bufferserrors (#1987)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 nullTile#bufferserrors (#1987)New Features & Improvements
Added
symbol-avoid-edgesstyle property (#1951)
Improvedsymbol-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.x
0.12.3
14 Jan 2016API 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 (#1882, #757)UX Improvements
Improve touch handler perceived performance (#1844)
0.12.2
22 Dec 2015Support LngLat.convert([w, s, e, n])
Invalid GeoJSON is now handled better
Fixed
Popup#addTowhen the popup is already open
API Improvements
Support LngLat.convert([w, s, e, n])
Invalid GeoJSON is now handled better
Bugfixes
Fixed
Popup#addTowhen the popup is already openFixed warping when rotating / zooming really fast
Map#flyTonow flies across the antimeridan if shorter
0.12.1
8 Dec 2015- breaking
Reversed the direction of line-offset
- breaking
Renamed Pinch interaction handler to TouchZoomRotate
- breaking
Made Map#update and Map#render private methods
Breaking changes
- breaking
Reversed the direction of line-offset
- breaking
Renamed Pinch interaction handler to TouchZoomRotate
- breaking
Made Map#update and Map#render private methods
API Improvements
Added an method to disable touch rotation
Added a position option for Attribution
Bugfixes
Ensure tile loading errors are properly reported
Ensure re-adding a previously removed pop-up works
Made Map#remove remove created DOM elements
UX Improvements
Don't round zoom level during double-click interaction
0.12.0
3 Dec 2015Added
line-offsetstyle property
- 0.11.x
0.11.5
1 Dec 2015Fixed unstable symbol layer render order when adding / removing layers
Fire map loaded event even if raster tiles have errors
Fix panning animation during easeTo with zoom change
Bugfixes
Fixed unstable symbol layer render order when adding / removing layers
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
API Improvements
Fire
mousedownandmouseupeventsFire
movestartandmoveendwhen panningAdded drag events
Request webp images for mapbox:// raster tiles in chrome
UX Improvements
Added inertia to map rotation
0.11.4
16 Nov 2015Fix alpha blending of alpha layers
0.11.3
10 Nov 2015Fix GeoJSON rendering and performance
Use SVG assets for UI controls
Zoom out with shift + dblclick
0.11.2
29 Oct 2015Misc performance improvements
Fix layer minZoom being ignored if not less than source maxZoom
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
Fix
raster-opacityon non-tile sourcesIgnore boxzoom on shift-click
UX Improvements
Enable line breaks on common punctuation
API Improvements
Add toString and toArray methods to LngLat, LngLatBounds
Add
Transform#resizemethodAdd
Map#getLayermethodAdd
Transform#unmodifiedpropertyPropagate WebGL context events
0.11.1
30 Sep 2015Add statistics and checkboxes to debug page
Fix
Map#featuresAtfor non-4096 vector sourcesDon't fire
mousemoveon drag-pan
Bugfixes
Add statistics and checkboxes to debug page
Fix
Map#featuresAtfor non-4096 vector sourcesDon't fire
mousemoveon drag-panFix maxBounds constrains
Fix maxBounds infinite loop
Fix memory leak in worker
Assert valid
TileCoord, fix wrap calculation inTileCoord#coverAbort raster tile load if not in viewport
API Improvements
Add
Mapevent listeners formouseup,contextmenu(right click)
0.11.0
14 Sep 2015Add
Map#featuresIn: a bounding-box feature queryEmit stylesheet validation errors
Handle v8 style
center,zoom,bearing,pitch
API Improvements
Add
Map#featuresIn: a bounding-box feature queryEmit stylesheet validation errors
UX Improvements
Handle v8 style
center,zoom,bearing,pitchImprove circle type styling
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
Fixed modification of
text-sizeviasetLayoutPropertyThrow on lat > 90 || < -90.
Fix circle clipping bug
- 0.10.x
0.10.0
21 Aug 2015- breaking
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:
The following APIs now expect array coordinates in [longitude, latitude] order:
- breaking
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.
- breaking
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.
Breaking changes
- breaking
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#getLngLatThe
latLngproperty of Map events was renamedlngLat
The following APIs now expect array coordinates in [longitude, latitude] order:
LngLat.convertLngLatBounds.convertPopup#setLngLatThe
centerandmaxBoundsoptions of theMapconstructorThe arguments to
Map#setCenter,Map#fitBounds,Map#panTo, andMap#projectThe
centeroption ofMap#jumpTo,Map#easeTo, andMap#flyToThe
aroundoption ofMap#zoomTo,Map#rotateTo, andMap#easeToThe
coordinatesproperties of video and image sources
- breaking
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.
- breaking
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. - breaking
Mapbox default styles are now hosted via the Styles API rather than 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. - breaking
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. - breaking
Removed
mbgl.config.HTTP_URLandmbgl.config.FORCE_HTTPS; https is always used when connecting to the Mapbox API. - breaking
Renamed
mbgl.config.HTTPS_URLtombgl.config.API_URL.
Bugfixes
Don't draw halo when halo-width is 0
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.x
0.9.0
29 Jul 2015glyphsURL now normalizes without the/v4/prefix formapbox://urls. Legacy behavior formapbox://fontstacksis still maintainedExpose
geojson-vtoptions for GeoJSON sourcesBearing snaps to "North" within a tolerance of 7 degrees
glyphsURL now normalizes without the/v4/prefix formapbox://urls. Legacy behavior formapbox://fontstacksis still maintainedExpose
geojson-vtoptions for GeoJSON sourcesBearing snaps to "North" within a tolerance of 7 degrees
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 controlsRefactored 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:
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 exposingincludeGeometryoptionBetter label placement along lines
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
Events bubble to the canvas container for custom overlays
Move handlers are now bound on mousedown and touchstart events
Map.featuresAt() now works across the dateline
- 0.8.x
0.8.2
29 Jul 20150.8.1
22 Jun 2015No code changes; released only to correct a build issue in 0.8.0.
0.8.0
15 Jun 2015- breaking
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 - breaking
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 - breaking
mapboxgl.Sourceis no longer exported. Usemap.addSource()instead. See the GeoJSON line or GeoJSON markers examples.
Breaking changes
- breaking
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 - breaking
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 - breaking
mapboxgl.Sourceis no longer exported. Usemap.addSource()instead. See the GeoJSON line or GeoJSON markers examples. - breaking
mapboxgl.util.supported()moved tomapboxgl.supported().
UX improvements
Add perspective rendering
Better and faster labelling
Add touch interactions support on mobile devices
Viewport-relative popup arrows
Normalize mousewheel zooming speed
Add proper handling of GeoJSON features that cross the date line
Sort overlapping symbols in the y direction
Control buttons are now on a 30 pixel grid
Improve GeoJSON processing performance
API Improvements
Switch to JSDoc for documentation
Bundling with browserify is now supported
Validate incoming map styles
Add
MapsetPitchgetPitchAdd
Mapdblclickevent.Add
MapgetSourceAdd
MapsetFilterandgetFilterAdd
MapfailIfMajorPerformanceCaveatoptionAdd
MappreserveDrawingBufferoptionAdd
VideoSourcegetVideo()Support vector tiles with extents other than 4096
Use a DOM hierarchy that supports evented overlays
Pass
latLngto the event object
UX Bugfixes
Fix rendering glitch on iOS 8
Support unicode range 65280-65535
Fix cracks between fill patterns
Fix angle of icons aligned with lines
Fix dashed line bug for overscaled tiles
Fix icon artifacts caused by sprite neighbors
API Bugfixes
Don't fire spurious
moveendevents on mouseupFix a race condition in
featuresAtFix for brittle fontstack name convention
Fix broken
PopupsetHTMLFix an issue with cross-origin image requests
- 0.7.x
0.7.0
4 Mar 2015- breaking
Rename
Maphoverevent tomousemove. - breaking
Change
featuresAtto return GeoJSON objects, including geometry - breaking
Remove
Mapcanvasandcontainerproperties, addgetCanvasandgetContainermethods instead
Breaking
- breaking
Rename
Maphoverevent tomousemove. - breaking
Change
featuresAtto return GeoJSON objects, including geometry - breaking
Remove
Mapcanvasandcontainerproperties, addgetCanvasandgetContainermethods instead
UX Improvements
Improve line label density
Add boxzoom interaction
Add keyboard interaction
Faster
GeoJSONSourcesetDatawithout flickering
API Improvements
Add Popup component
Add layer API
Add filter API
More efficient filter API
Accept plain old JS object for
addSourceReparse overscaled tiles
Bugfixes
Fix
featuresAtfor LineStringsFix
tileSizeargument toGeoJSONworkerRemove extraneous files from the npm package
Hide "improve map" link in print
- 0.6.x
0.6.0
10 Feb 2015- 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.
- breaking
HTTP_URL and HTTPS_URL config options must no longer include a
/v4path prefix. - breaking
addClass,removeClass,setClasses,hasClass, andgetClassesare now methods on Map.
Bugfixes
Add wrapped padding to sprite for repeating images
Clear color buffers before rendering
Make line-opacity work with line-image
Event.toElement fallback for Firefox
Skip duplicate vertices at ends of lines
Allow characters outside \w to be used in token
Clear old tiles when new GeoJSON is loaded
Improvements
Added
map.setPaintProperty(),map.getPaintProperty(),map.setLayoutProperty(), andmap.getLayoutProperty().Switch to ESLint and more strict code rules
Grab 2x raster tiles if retina
Support for mapbox:// style URLs
Breaking
- 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.
- breaking
HTTP_URL and HTTPS_URL config options must no longer include a
/v4path prefix. - breaking
addClass,removeClass,setClasses,hasClass, andgetClassesare now methods on Map. - breaking
Style#cascadeis now private, pending a public style mutation API (#755). - breaking
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.x
0.5.2
8 Jan 2015Remove tiles for unused sources
Fix fill pattern alignment
Add GeoJSONSource maxzoom option
Bugfixes
Remove tiles for unused sources
Fix fill pattern alignment
Improvements
Add GeoJSONSource maxzoom option
Return ref layers in featuresAt
Return any extra layer keys provided in the stylesheet in featuresAt
Faster protobuf parsing
0.5.1
19 Dec 2014Fix race conditions with style loading/rendering
Fix race conditions with setStyle
Fix map.remove()
Bugfixes
Fix race conditions with style loading/rendering
Fix race conditions with setStyle
Fix map.remove()
Fix featuresAt properties
0.5.0
18 Dec 2014- breaking
Results format for
featuresAtchanged Fix multiple calls to setStyle
featuresAtnow returns additional information
Bugfixes
Fix multiple calls to setStyle
Improvements
featuresAtnow returns additional informationComplete 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
- breaking
Results format for
featuresAtchanged
- 0.4.x
0.4.2
14 Nov 2014Ensure only one easing is active at a time
Don't require style to perform easings
Fix raster tiles sometimes not showing up
Bugfixes
Ensure only one easing is active at a time
Don't require style to perform easings
Fix raster tiles sometimes not showing up
Improvements
Internet Explorer 11 support (experimental)
0.4.1
10 Nov 2014Interpolate to the closest bearing when doing rotation animations
0.4.0
4 Nov 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.x
0.3.2
23 Oct 2014Fix worker initialization with deferred or async scripts
Added map.remove()
CDN assets are now served with gzip compression
0.3.1
6 Oct 2014Fixed iteration over arrays with for/in
Made browserify deps non-dev