This repository has been archived by the owner on Dec 4, 2019. It is now read-only.
Update dependency mapbox-gl to ^0.44.0 - autoclosed #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull Request updates dependency mapbox-gl from
^0.40.1
to^0.44.0
Release Notes
v0.44.2
Compare Source
🐛 Bug fixes
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 .)v0.44.1
Compare Source
🐛 Bug fixes
map.queryRenderedFeatures()
#6074v0.44.0
Compare Source
✨ Features and improvements
script-src 'unsafe-eval'
#559LngLatBounds#isEmpty()
method #5917collectResourceTiming
option to the enable collection of Resource Timing data for requests that are made from Web Workers. (#5948)🐛 Bug fixes
==
and!=
expressions #5947renderWorldCopies
#5932Map#remove()
#5943, #5951GeoJSONSource#setData()
caused labels to fade out and back in (#6002)move
events to be fired out of sync with actual map movements (#6005)Map
did not firemouseover
events (#6000] (h/t @jay-manday)v0.43.0
Compare Source
before
parameter tomoveLayer
does not exist #5679"colorSpace": "hcl"
now uses shortest-path interpolation for hue #5811✨ Features and improvements
raster-dem
source type andhillshade
layer type #5286Map#hasImage
#5775==
and!=
expressions #5840coalesce
expressions more useful #5755supported()
now returns false on old IE 11 versions that don't support Web Worker blob URLs #5801🐛 Bug fixes
to-rgba
andrgba
expressions #5778, #5866*-pattern
andline-dasharray
#5791colorSpace
function property #5843v0.42.2
Compare Source
🐛 Bug fixes
v0.42.1
Compare Source
🐛 Bug fixes
map.showCollisionBoxes
is set tofalse
#5673heatmap-color
#5682history.replaceState
error #5613✨ Features and improvements
v0.42.0
Compare Source
heatmap-color
use expressions instead of stop functions #5624{tokens}
in expressions fortext-field
andicon-image
#5599curve
expression intostep
andinterpolate
expressions #5542line-dasharray
#5519✨ Features and improvements
sqrt
expression #5493🐛 Bug fixes and error reporting improvements
fitBounds
when both zooming and padding change #4846queryRenderedFeatures
on a heatmap layer #5594queryRenderedSymbols
to return results from different sources #5554circle-stroke-width
inqueryRenderedFeatures
#5514circle-stroke-opacity
of 0 #5496icon-text-fit
with a data-driventext-size
#5632position
field in GeoJSON #56080.41.0 (October 11, 2017)
Map#setStyle
.canvas
sourcecontextType
option added in 0.40.0 #5449🐛 Bug fixes
✨ 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
: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_category
andfeature.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-radius
issquare_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.
🔧 Development workflow improvements
0.40.1 (September 18, 2017)
🐛 Bug fixes
CanvasSource
coordinates were flipped and improve performance for non-animatedCanvasSource
s #5303fill-extrusion-height
property #53200.40.0 (September 13, 2017)
Map#addImage
now requires the image as anHTMLImageElement
,ImageData
, or object withwidth
,height
, anddata
properties with the same format asImageData
. It no longer accepts a rawArrayBufferView
in the secondargument and
width
andheight
options in the third argument.canvas
sources now require acontextType
option specifying the drawing context associated with the source canvas. #5155✨ Features and improvements
fill-extrusion
layers on the same map #5101icon-anchor
property to symbol layers #5183transformRequest
option, allowing users to provide a callback that transforms resource request URLs #5021text-max-width
#5067text-letter-spacing
#5071line-join
#5020Map#addImage()
#5181🐛 Bug fixes
Marker#getElement()
method #5242layer.minzoom
#2929center
option #5042 (h/t @karthikb351)Map#addLayer()
with an inline source would mutate its input #4040NavigationControl
triggered mouse events unexpectedly #5148NavigationControl
compass caused an error in IE 11 #4784fast-stable-stringify
module #5152Marker#togglePopup()
failing to return the marker instance #5116🔧 Development workflow improvements
0.39.1 (July 24, 2017)
🐛 Bug fixes
0.39.0 (July 21, 2017)
GeolocateControl
breaking changes #4479watchPosition
has been replaced withtrackUserLocation
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.maxZoom
can be controlled via the newfitBoundsOptions
option (defaults to 15).Marker
s at their center by default #5019 @andrewharveysignificantRotateThreshold
for theTouchZoomRotateHandler
#4971, @dagjomar✨ Features and improvements
GeolocateControl
#4479, @andrewharveyshowUserLocation
to draw a "dot" as aMarker
on the map at the user's locationtrackUserLocation
. 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.fitBoundsOptions
to control the camera operationtrackuserlocationstart
andtrackuserlocationend
eventsLngLat.toBounds
method to extend a point location by a given radius to aLngLatBounds
objectpackage.json
#4809, @tomscholzline-width
#4773text-anchor
#4997text-justify
#5000maxTileCacheSize
option #4778, @jczaplewicon-pitch-alignment
andcircle-pitch-alignment
properties #4869 #4871Map#getMaxBounds
method #4890, @andrewharvey @lamuertepeludalocalIdeographFontFamily
) to use TinySDF to avoid loading expensive CJK glyphs #4895config.API_URL
includes a path prepend it to the request URL #4995supercluster
version to exposecluster_id
property on clustered sources #5002🐛 Bug fixes
FullscreenControl
on unsupported devices #4838, @stepankuzminloadData
to the same worker every time #4877load
#4870LogoControl
logic to update correctly, and hide the<div>
instead of removing it from the DOM when it is not needed #4842GeoJSONSource#serialize
to include all optionsGlyphSource#getSimpleGlyphs
#4992setStyle
to reload raster tiles #4852Map#queryRenderedFeatures
would error when returning no results #4993Map#areTilesLoaded
would always be false onsourcedata
events for reloading tiles #4987🛠️ Development workflow changes
package.json
#4819 @tomscholz0.38.0 (June 9, 2017)
New features ✨
Bug fixes 🪲
webglcontextlost
event #4725 @cdawiflyTo
to within the map's specified min- and maxzoom to prevent undefined behavior #4726 @ IvanSanchezflyTo
calls #4761queryRenderedSymbols
logic to better account for pitch scaling #4792text-keep-upright
aftertext-offset
to keep labels upright when intended #4779 [Potentially breakingAccessibility improvements 🔉
aria-label
to popup close button #4799 @andrewharveyDevelopment workflow + testing improvements 🔧
pitchWithRotate
option #4800 @simast0.37.0 (May 2nd, 2017)
LngLat#wrapToBestWorld
New features 🚀
Map#isStyleLoaded
andMap#areTilesLoaded
events #4321file:
protocol #4649 @oscarfontsBug fixes 🐛
Map#addImage
#4644Development workflow improvements 💻
mapboxgl-
prefix on all classes #4584 @asantos30260.36.0 (April 19, 2017)
New features ✨
Bug fixes 🐛
fill_outline
shaders #4600Camera#easeTo
interpolation on pitched maps #4540property
's type #4614Development workflow improvements 🤓
style.json
in integration testsgl-style-composite
is now executable in line with the other tools @andrewharvey #4595gl-style-composite
utility now throws an error if a name conflict would occur between layers @andrewharvey #45950.35.1 (April 12, 2017)
Bug fixes 🐛
.json
extension to style-specrequire
statements for webpack compatibility #4563 @orangemugMap#fitBounde
#4569 @andrewharveyid
field. #45810.35.0 (April 7, 2017)
New features 🚀
pitchstart
andpitchend
events #2449layers
parameter toMap#on
#1002text-offset
#4495text-rotate
#3516icon-image
#4304{text,icon}-size
#4455Bug fixes 🐛
GeoJSONSource#setData()
could cause unnecessary DOM updates #4447Map#flyTo
did not respect therenderWorldCopies
setting #4449addImage
api #4531shift+zoom
#3334refreshedExpiredTiles
option #4549bounds
property #1775Development workflow improvements 💻
0.34.0 (March 17, 2017)
New features 🚀
Map#addImage
andMap#removeImage
API to allow adding icon images at runtime #4404Bug fixes 🐛
queryRenderedFeatures
to fail in cases where both multiple sources and data-driven paint properties were present #4417map.loaded()
to incorrectly returnfalse
#4425Testing improvements ✅
0.33.1 (March 10, 2017)
Bug fixes 🐛
type='button'
toFullscreenControl
to prevent button from acting as a form submit #4397Ctrl
key is released before the click during aDragRotate
event #4389options.easing
description from theMap#fitBounds
documentation #44020.33.0 (March 8, 2017)
maxZoom
from 20 to 22 #4333tiledata
andtiledataloading
events in favor ofsourcedata
andsourcedataloading
. #4347mapboxgl.util
is 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✅ New features
Map#fitBounds
to accept different values for top, bottom, left, and rightpadding
#3890FullscreenControl
for displaying a fullscreen map #3977🪲 Bug fixes
MapDataEvent#isSourceLoaded
always returned false #4254MapEventData
is passed through on callsMap#flyTo
#4342Map#isMoving
#4350$id
in filters #4236 #4237layers
parameter toqueryRenderedFeatures
#4331minZoom
andmaxZoom
values #4324Dev workflow changes
src/style-spec
andtest/unit/style-spec
).0.32.1 (Jan 26, 2017)
Bug Fixes
mapbox-gl-rtl-text
plugin to not work #40550.32.0 (Jan 26, 2017)
Deprecation Notices
New Features
Map#isSourceLoaded
method #4033Expires
andCache-Control
HTTP headers #3944around=center
option toscrollZoom
andtouchZoomRotate
interaction handlers #3876mapbox-gl-rtl-text
plugin to support right-to-left scripts #3758canvas
source type #3765Map#isMoving
method #2792Bug Fixes
0.31.0 (Jan 10 2017)
New Features
renderWorldCopies
option to theMap
constructor to give users control over whether multiple worlds are rendered in a map #3885Bug Fixes
Map
pitch or bearing is changed #3938undefined
source #3903Miscellaneous
mapbox-gl-test-suite
into this repository #38340.30.0 (Jan 5 2017)
New Features
gl.MAX_RENDERBUFFER_SIZE
#2893geojson
source and specifies asource-layer
#3896Performance Improvements
Map#setStyle
performance in some cases #3853Bug Fixes
showTileBoundaries
with no sources #38490.29.0 (December 20 2016)
New Features
Map#setStyle
smoothly transition to the new style #3621styledata
,sourcedata
,styledataloading
, andsourcedataloading
eventsisSourceLoaded
andsource
properties toMapDataEvent
#3590circle-stroke-*
style properties #3672container
element doesn't exist #3719watchPosition
option toGeolocateControl
#3739positionOptions
option toGeolocateControl
#3739aria-label
to map canvas #3782icon-offset
#3791Performance Improvements
Map#removeSource
#3602gl-matrix
#3734Bug fixes
line-color
property functions #3639Map#fitBounds
#3655Map#setStyle
#3829Map
from emitting acontextmenu
event on Windows browsers #38220.28.0 (November 17 2016)
New features and improvements
Map#addLayer
andMap#removeLayer
#3584Map#moveLayer
#3584Bug fixes
fill-opacity
rendering when using afill-pattern
#3598AssertionErrors
from pitching raster layers by only callingWorker#redoPlacement
on vector and GeoJSON sources #36240.27.0 (November 11 2016)
fill-extrude-height
andfill-extrude-base
properties offill
render type with a separatefill-extrusion
type (with correspondingfill-extrusion-height
andfill-extrusion-base
properties), solving problems with render parity and runtime switching between flat and extruded fills.https://github.com/mapbox/mapbox-gl-style-spec/issues/554
fill-extrusion-height
,fill-extrusion-base
) from "magic numbers" to meters. #3509mapboxgl.Control
class and change the way custom controls should be implemented. #3497mapboxgl.util
functions:inherit
,extendAll
,debounce
,coalesce
,startsWith
,supportsGeolocation
. #3441 #3571mapboxgl.util
is deprecated and will be removed in the next release. #1408New features and improvements
mapboxgl.workerCount
) for better performance. #3565categorical
style function type when input values are strings. #3384https
). #3571Map#getMaxZoom
andMap#getMinZoom
methods #3592Bugfixes
background
layers. #3521raster-fade-duration
property. #35320
). #3463queryRenderedFeatures
working incorrectly on colliding labels. #3459map.loaded()
always returnedtrue
when using raster tile sources. #3302failed to invert matrix
error. #3518queryRenderedFeatures
throwing an error if no parameters provided. #3542\n
in a text field resulted in an error. #3570Misc
npm install mapbox-gl
pulling in alldevDependencies
, leading to an extremely slow install. #33770.26.0 (October 13 2016)
New Features & Improvements
fill-extrude-height
andfill-extrude-base
style properties (3d buildings) 🏙️ #3223colorSpace
interpolation to functions #3245identity
function type #3274'pitch-alignment': 'map'
#3243dataloading
events for styles and sources #3306Control
suffix to all controlsref
s automatically and get rid of user-specifiedref
sPerformance Improvements
Bugfixes
Marker#setLngLat
is called #3294touchend
on Android Chrome #3319tile
property todata
events fired when a tile is removed #33280.25.1 (September 30 2016)
Bugfixes
0.25.0 (September 29 2016)
Breaking Changes
Evented#off
now require two arguments; omitting the second argument in order to unbind all listeners for an eventtype is no longer supported, as it could cause unintended unbinding of internal listeners.
New Features & Improvements
data
anddataloading
events (#3255)auto
value for style spec properties (#3203)Bugfixes
LngLat#convert
(#3232)tiles
field is omitted from theRasterTileSource#serialize
method (#3259)div
within theNavigation
control<button>
with aspan
element (#3268)Marker
instances to be translated to non-whole pixel coordinates that caused blurriness (#3270)Performance Improvements
0.24.0 (September 19 2016)
New Features & Improvements
mapbox://
URLs #3113Worker
scriptBlob
size #3158package.json
#3174text-field
#3179Map#queryRenderedFeatures
on nonexistent layer #3196Scale
control #3160Bugfixes
Map#getBounds
#3081Map#setFilter
and map rotation on iOS 10 #32070.23.0 (August 25 2016)
New Features & Improvements
line-color
property functions #2938Scale
control #2940 #3042Popup
offset
option #1962Marker#bindPopup
method #3056Performance Improvements
WebWorker
pool #2952Bugfixes
LatLngBounds
obey its documented argument order (southwest
,northeast
), allowing bounds across the dateline #2414fill-opacity
property functions to not render as expected #30610.22.1 (August 18 2016)
New Features & Improvements
Bugfixes
Map#querySourceFeatures
#3022Map#loaded
to return true while there are outstanding tile updates #28470.22.0 (August 11 2016)
Breaking Changes
GeoJSONSource
,VideoSource
,ImageSource
constructors are now private. Please usemap.addSource({...})
to create sources andmap.getSource(...).setData(...)
to update GeoJSON sources. #2667Map#onError
has been removed. You may catch errors by listening for theerror
event. If no listeners are bound toerror
, error messages will be printed to the console. #2852New Features & Improvements
$id
#2888close
event toPopup
s #2953offset
option toMarker
#2885error
events without any listeners to the console #2852Source
interface to prepare for custom source types #2667Bugfixes
DataCloneError
in Firefox and IE11 #2559moveend
listeners #2944fill-outline-color
from being unset #29640.21.0 (July 13 2016)
Breaking Changes
line-offset
, reversing the direction of the offset. #2889New Features & Improvements
text-pitch-alignment
style property #2668mapbox://
URLs #2702icon-text-fit
andicon-text-fit-padding
style properties #2720icon-rotate
#2738fill-opacity
#2733Map#mouseout
events #2777Marker
class #2725 #2810{quadkey}
URL parameter #2805circle-pitch-scale
style property #2821Bugfixes
Map#loaded
returning true while there are outstanding tile updates #2847queryRenderedFeatures
in Safari and Firefox #2822mapboxgl#supported()
returningtrue
in old versions of IE11 mapbox/mapbox-gl-supported#10.20.1 (June 21 2016)
Bugfixes
*-translate
properties viasetPaintProperty
(#2762)0.20.0 (June 10 2016)
New Features & Improvements
workerCount
constructor option #2666locationPoint
andpointLocation
#2690version
property to mapboxgl #2660circle-opacity
andcircle-blur
#2693Bugfixes
queryRenderedFeatures
#26940.19.1 (June 2 2016)
Bugfixes
0.19.0 (May 31 2016)
New Features & Improvements
fill-color
andfill-outline-color
#2629has
and!has
filter operators mapbox/feature-filter#15trackResize
option toMap
#2591Bugfixes
fill-pattern
from a fill layer #2534line-pattern
andfill-pattern
rendering #2596queryRenderedFeatures
before the map is loaded #26210.18.0 (April 13 2016)
New Features & Improvements
circle-color
andcircle-size
#2454Bugfixes
Map#setFilter
#24950.17.0 (April 13 2016)
Breaking Changes
map.batch
in 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 #2380util.throttle
#2345New Features & Improvements
Map#queryRenderedFeatures
andMap#querySourceFeatures
#2349circle-color
andcircle-size
#1932Popup#setDOMContent
method #2436Bugfixes
WebWorker
instead of# cpus - 1
WebWorker
s, slowing down tile loading times #2408Map#queryRenderedFeatures
would sometimes return features that had been removed #2353clusterMaxZoom
option onGeoJSONSource
not working as expected #2374Map#queryRenderedFeatures
orMap#querySourceFeatures
with no argumentsMap#setLayoutProperty
fortext-field
oricon-image
#24070.16.0 (March 24 2016)
Breaking Changes
Map#featuresAt
andMap#featuresIn
withMap#queryRenderedFeatures
andmap.querySourceFeatures
(#2224)featuresAt
andfeaturesIn
withqueryRenderedFeatures
queryRenderedFeatures
synchronous, remove the callback and use the return value.layer
parameter tolayers
and make it an array of layer names.radius
parameter.radius
was used withfeaturesAt
to account for style properties likeline-width
andcircle-radius
.queryRenderedFeatures
accounts for these style properties. If you need to query a larger area, use a bounding box query instead of a point query.includeGeometry
parameter becausequeryRenderedFeatures
always includes geometries.Map#debug
is renamed toMap#showTileBoundaries
(#2284)Map#collisionDebug
is renamed toMap#showCollisionBoxes
(#2284)New Features & Improvements
GeoJSONSource#setData
. (#2222)Map#setMaxBounds
method (#2234)isActive
andisEnabled
methods to interaction handlers (#2238)Map#setZoomBounds
method (#2243)map.queryRenderedFeatures
to query the styled and rendered representations of features (#2224)map.querySourceFeatures
to get features directly from vector tiles, independent of the style (#2224)mapboxgl.Geolocate
control (#1939)Bugfixes
setFilter
,setLayoutProperty
, andsetLayerZoomRange
on ref children (#2228)undefined
bucket errors aftersetFilter
calls (#2244)queryRenderedFeatures
precision at high zoom levels (#2292)queryRenderedFeatures
(#2306)0.15.0 (March 1 2016)
New Features & Improvements
ImageSource#setCoordinates
andVideoSource#setCoordinates
(#2184)Bugfixes
0.14.3 (Feb 25 2016)
New Features & Improvements
setData
(#2174)Bugfixes
in
feature filter drops features (#2166)Map#load
from firing when tile "Not Found" errors occured (#2176)0.14.2 (Feb 19 2016)
Bugfixes
tileSize: 512
as a switch to trade retina support for 512px raster tiles0.14.1 (Feb 10 2016)
Bugfixes
0.14.0 (Feb 8 2016)
Breaking Changes
GeoJSONSource
clustering options from being measured in extent-units to pixels (#2026)New Features & Improvements
filter
performance and maximum size (#2024)Map#getStyle
method (#1982)Bugfixes
mapboxgl.supported()
(#2018)minzoom
setting for GeoJSON sources (#1651)performance.now
not being present on some browsers (#2056)0.13.1 (Jan 27 2016)
Bugfixes
0.13.0 (Jan 27 2016)
Bugfixes
Tile#buffers
errors (#1987)New Features & Improvements
symbol-avoid-edges
style property (#1951)symbol-max-angle
check algorithm (#1959)0.12.4 (Jan 19 2016)
Bugfixes
0.12.3 (Jan 14 2016)
API Improvements
Bugfixes
UX Improvements
0.12.2 (Dec 22 2015)
API Improvements
Bugfixes
Popup#addTo
when the popup is already open (#1811)Map#flyTo
now flies across the antimeridan if shorter (#1853)0.12.1 (Dec 8 2015)
Breaking changes
line-offset
(#1808)Pinch
interaction handler toTouchZoomRotate
(#1777)Map#update
andMap#render
private methods (#1798)Map#remove
remove created DOM elements (#1789)API Improvements
position
option forAttribution
(#1689)Bugfixes
UX Improvements
0.12.0 (Dec 2 2015)
API Improvements
line-offset
style property (#1778)0.11.5 (Dec 1 2015)
Bugfixes
mouseend
events (#1104)API Improvements
mousedown
andmouseup
events (#1411)movestart
andmoveend
when panning (#1658)UX Improvements
0.11.4 (Nov 16 2015)
Bugfixes
0.11.3 (Nov 10 2015)
Bugfixes
UX Improvements
0.11.2 (Oct 29 2015)
Bugfixes
devicePixelRatio
s (#1029 #1475 #1476)raster-opacity
on non-tile sources (#1270)UX Improvements
API Improvements
Transform#resize
methodMap#getLayer
method (#1183)Transform#unmodified
property (#1452)0.11.1 (Sep 30 2015)
Bugfixes
Map#featuresAt
for non-4096 vector sources (#1529)mousemove
on drag-panTileCoord
, fix wrap calculation inTileCoord#cover
(#1483)API Improvements
Map
event listeners formouseup
,contextmenu
(right click) (#1532)0.11.0 (Sep 11 2015)
API Improvements
Map#featuresIn
: a bounding-box feature queryUX Improvements
center
,zoom
,bearing
,pitch
(#1452)Bugfixes
text-size
viasetLayoutProperty
(#1451)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:
LatLng
was renamed toLngLat
LatLngBounds
was renamed toLngLatBounds
Popup#setLatLng
was renamed toPopup#setLngLat
Popup#getLatLng
was renamed toPopup#getLngLat
latLng
property of Map events was renamedlngLat
The following APIs now expect array coordinates in [longitude, latitude] order:
LngLat.convert
LngLatBounds.convert
Popup#setLngLat
center
andmaxBounds
options of theMap
constructorMap#setCenter
,Map#fitBounds
,Map#panTo
, andMap#project
center
option ofMap#jumpTo
,Map#easeTo
, andMap#flyTo
around
option ofMap#zoomTo
,Map#rotateTo
, andMap#easeTo
coordinates
properties of video and image sourcesUpdated 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:style
portion of the URL no longer contains a username. For font URLs, youshould now use the format
mapbox://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 labelsor contour lines via classes. For a labeled satellite style, use
mapbox://styles/mapbox/satellite-hybrid
.Removed
mbgl.config.HTTP_URL
andmbgl.config.FORCE_HTTPS
; https is always used when connecting to the Mapbox API.Renamed
mbgl.config.HTTPS_URL
tombgl.config.API_URL
.Bugfixes
API Improvements
setLayoutProperty
andsetPaintProperty
APIsby passing
undefined
as a property value.layer
option offeaturesAt
now supports an array of layers.0.9.0 (Jul 29 2015)
glyphs
URL now normalizes without the/v4/
prefix formapbox://
urls. Legacy behavior formapbox://fontstacks
is still maintained (#1385)Expose
geojson-vt
options 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 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: (#1352)
Improved documentation
featuresAt
performance improvements by exposingincludeGeometry
optionBetter 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)
0.8.0 (Jun 15 2015)
Breaking changes
map.setView(latlng, zoom, bearing)
has been removed. Usemap.jumpTo(options)
instead:map.easeTo
andmap.flyTo
now accept a singleoptions object rather than positional parameters:
mapboxgl.Source
is no longer exported. Usemap.addSource()
instead. See theGeoJSON line or
GeoJSON markers
examples.
mapboxgl.util.supported()
moved tomapboxgl.supported()
.UX improvements
API Improvements
Map
setPitch
getPitch
Map
dblclick
event. (#1168)Map
getSource
(660a8c1)Map
setFilter
andgetFilter
(#985)Map
failIfMajorPerformanceCaveat
option (#1082)Map
preserveDrawingBuffer
option (#1232)VideoSource
getVideo()
(#1162)latLng
to the event object (#1068)UX Bugfixes
API Bugfixes
moveend
events on mouseup (#1107)featuresAt
(#1220)Popup
setHTML
(#1272)0.7.0 (Mar 3 2015)
Breaking
Map
hover
event tomousemove
.featuresAt
to return GeoJSON objects, including geometry (#1010)Map
canvas
andcontainer
properties, addgetCanvas
andgetContainer
methods insteadUX Improvements
GeoJSONSource
setData
without flickering (#973)API Improvements
addSource
(#1021)Bugfixes
featuresAt
for LineStrings (#1006)tileSize
argument toGeoJSON
worker (#987)0.6.0 (Feb 9 2015)
Bugfixes
Improvements
map.setPaintProperty()
,map.getPaintProperty()
,map.setLayoutProperty()
, andmap.getLayoutProperty()
.Breaking
now expected to be version 7. You can use the gl-style-migrate
utility to update existing styles.
/v4
path prefix.addClass
,removeClass
,setClasses
,hasClass
, andgetClasses
are now methodson Map.
Style#cascade
is now private, pending a public style mutation API (#755).featuresAt
results changed. Instead of result-per-geometry-cross-layer,each result has a
layers
array with all layers that contain the feature. This avoidsduplication of geometry and properties in the result set.
0.5.2 (Jan 07 2015)
Bugfixes
Improvements
0.5.1 (Dec 19 2014)
Bugfixes
0.5.0 (Dec 17 2014)
Bugfixes
Improvements
featuresAt
now returns additional informationstyle.load, style.error, style.change,
source.add, source.remove, source.load, source.error, source.change,
tile.add, tile.remove, tile.load, tile.error
Breaking
featuresAt
changed0.4.2 (Nov 14 2014)
Bugfixes
Improvements
0.4.1 (Nov 10 2014)
Bugfixes
0.4.0 (Nov 4 2014)
Breaking
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
Improvements
0.3.1 (Oct 06 2014)
Bugfixes
0.3.0 (Sep 23 2014)
Breaking
now expected to be version 5. You can use the gl-style-migrate
utility to update existing styles.
raster-hue-rotate
units are now degrees.Improvements
symbol-avoid-edges
property to allow labels to be placed across tile edges.Bugfixes
raster-opacity
for regular raster layers.0.2.2 (Aug 12 2014)
Breaking
map.setBearing()
no longer supports a second argument. Usemap.rotateTo
with anoffset
option and duration 0if you need to rotate around a point other than the map center.
Improvements
GeoJSONSource
to also accept URL asdata
option, eliminating a huge performance bottleneck in case of large GeoJSON files.#669 #671
around
option toMap
zoomTo
/rotateTo
.Bugfixes
util.supports
WebGL detection producing false positives in some cases. #677Map
project
/unproject
to properly accept array-form values.GeoJSONSource
setData
not updating the map until zoomed or panned. #6760.2.1 (Aug 8 2014)
Breaking
Navigation
control signature: now it doesn't needmap
in constructorand gets added with
map.addControl(nav)
ornav.addTo(map)
.mapboxgl-
.Improvements
attributionControl: false
in options).util.inherit
andutil.debounce
functions.Bugfixes
0.2.0 (Aug 6 2014)
v0.41.0
Compare Source
Map#setStyle
.canvas
sourcecontextType
option added in 0.40.0 #5449🐛 Bug fixes
✨ 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
: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_category
andfeature.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-radius
issquare_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.
🔧 Development workflow improvements
This PR has been generated by Renovate Bot.