2.1.0
Features ✨ and improvements 🏁
- Add ModelLayer API.
- Add support for offline maps, allowing users to download and store map data on their devices for use in environments with limited or no internet connectivity.
- Add layer expressions support. To use, specify expressions when constructing a layer.
Before:
mapboxMap.style.setStyleLayerProperty("layer", "line-gradient",
'["interpolate",["linear"],["line-progress"],0.0,["rgb",255,0,0],0.4,["rgb",0,255,0],1.0,["rgb",0,0,255]]');
After:
LineLayer(
...
lineGradientExpression: [
"interpolate",
["linear"],
["line-progress"],
0.0,
["rgb", 255, 0, 0],
0.4,
["rgb", 0, 255, 0],
1.0,
["rgb", 0, 0, 255]
],
);
- Expose
text-occlusion-opacity
,icon-occlusion-opacity
,line-occlusion-opacity
,model-front-cutoff
, andlineZOffset
as experimental. - Add min/max/default values for most of the style properties.
- Expose
clusterMinPoints
property forGeoJSONSource
. - Expose
SlotLayer
andRasterParticleLayer
. - Expose
LocationComponentSettings.slot
. - Add
@experimental
annotation to relevant APIs. - Expose
LineJoin.NONE
.