8. sprite
sprite
:雪碧图(
可选
,用来指定获取雪碧图及其元数据的 URL)
sprite
的音译是
雪碧
,直译是
精灵
,表示不受地图旋转缩放影响的图标等,类似精灵漂浮在空中。
当有
layer
使用了
background-pattern
、
fill-pattern
、
line-pattern
、
fill-extrusion-pattern
、
icon-image
等属性时,
sprite
必填。
"sprite": "mapbox://sprites/mapbox/bright-v8"
当指定了 sprite
后,mapbox
会自动生成雪碧图的完整请求地址,分别如下:
`${sprite}.png`
`${sprite}.json`
如果浏览器进行了缩放,则会加上缩放 DPI 因子 @2x
,如下:
`${sprite}@2x.png`
`${sprite}@2x.json`
9. glyphs
glyphs
:字形符号(可选
,用来指定加载以 PBF 格式设置的 有向距离场
字形的 URL 模板)
URL 模板必须带有占位符 {fontstack}
和 {range}
。
当有 layer
使用了 text-field
属性时,glyphs
必填。
"glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf"
10. transition
transition
:全局的过渡动画属性(可选
,用来作为所有过渡动画属性的默认值)
"transition": {
"duration": 300,
"delay": 0
11. light
light
:全局的光源(可选
)
"light": {
"anchor": "viewport",
"position": [1.15,210,30],
"color": "white",
"intensity": 0.5
12. sources *
sources
:数据源集合(必填
,用于包含一系列数据源 source
,这些数据源提供了在地图上显示的数据)
sources
是对象 {}
的形式,其属性名就是 数据源的名称
(或者说 数据源的 id
),这样可以根据 数据源的名称
(或者说 数据源的 id
)快速获取数据源的信息。
"sources": {}
每个数据源 source
都有一个 type
属性,用于指定其具体的类型:
vector
:矢量
raster
:栅格
raster-dem
:栅格化的数字高程模型
geojson
:GeoJSON 数据源
image
:图片
video
:视频
(1) vector
vector
:矢量切片数据源
"sources":{
"vector-source": {
"type": "vector",
"url": "mapbox://mapbox.mapbox-streets-v6"
"tiles": [
"http://a.example.com/tiles/{z}/{x}/{y}.pbf",
"http://b.example.com/tiles/{z}/{x}/{y}.pbf"
"bounds": [-180,-85.051129,180,85.051129],
"scheme":"xyz",
"minzoom": 0,
"maxzoom": 22,
"attribution": ""
(2) raster
raster
:栅格切片数据源(相比 vector
多了一个属性 tileSize
)
"sources":{
"raster-source": {
"type": "raster",
"url": "mapbox://mapbox.satellite"
"tiles": [
"http://a.example.com/tiles/{z}/{x}/{y}.pbf",
"http://b.example.com/tiles/{z}/{x}/{y}.pbf"
"bounds": [-180,-85.051129,180,85.051129],
"scheme":"xyz",
"minzoom": 0,
"maxzoom": 22,
"attribution": "",
"tileSize": 256
(3) raster-dem
raster-dem
:栅格化的数字高程模型(相比 raster
多了一个属性 encoding
)
"sources":{
"raster-dem-source": {
"type": "raster-dem",
"url": "mapbox://mapbox.terrain-rgb"
"tiles": [
"http://a.example.com/tiles/{z}/{x}/{y}.pbf",
"http://b.example.com/tiles/{z}/{x}/{y}.pbf"
"bounds": [-180,-85.051129,180,85.051129],
"scheme":"xyz",
"minzoom": 0,
"maxzoom": 22,
"attribution": "",
"tileSize": 256,
"encoding": "mapbox"
(4) geojson
geojson
:GeoJSON 数据源(数据必须通过 data
属性指定,data
属性值就是一个 GeoJSON
或者 GeoJSON
的请求地址)
"sources": {
"geojson-source": {
"type": "geojson",
"data": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-77.0323, 38.9131]
"properties": {
"title": "Mapbox DC",
"marker-symbol": "monument"
"maxzoom": 22,
"attribution": "",
"buffer": 128,
"tolerance": 0.375,
"cluster": false,
"clusterRadius": 50,
"clusterMaxZoom": 12,
"lineMetrics": false,
"generateId": false
(5) image
image
:图片数据源
"sources": {
"image-source": {
"type": "image",
"url": "https://docs.mapbox.com/mapbox-gl-js/assets/radar.gif",
"coordinates": [
[-80.425, 46.437],
[-71.516, 46.437],
[-71.516, 37.936],
[-80.425, 37.936]
(6) video
video
:视频数据源
"sources": {
"video-source": {
"type": "image",
"urls": [
"https://static-assets.mapbox.com/mapbox-gl-js/drone.mp4",
"https://static-assets.mapbox.com/mapbox-gl-js/drone.webm"
"coordinates": [
[-80.425, 46.437],
[-71.516, 46.437],
[-71.516, 37.936],
[-80.425, 37.936]
13. layers *
layers
:图层集合(必填
,包含了一系列图层 layer
,这些图层指定了如何渲染数据源提供的数据)
"layers": []
每个图层 layer
都有 id
(具有唯一性)和 type
属性,其中 type
属性指定了其具体的渲染类型:
fill
:填充
line
:线
circle
:圆点
symbol
:符号
background
:背景
raster
:栅格
heatmap
:热力图
hillshade
:坡面阴影
fill-extrusion
:三维填充
(1) fill
fill
:填充(用于给多边形 polygon
进行填充和描边)
"layers": [
"id": "fill-id",
"type": "fill",
"metadata": {
"mapbox:name": "test"
"source": "source-name",
"source-layer": "source-layer-name",
"minzoom": 0,
"maxzoom": 24,
"filter": [],
"layout": {
"visibility": "visible",
"paint": {
"fill-antialias": true,
"fill-opacity": 1,
"fill-pattern": "",
"fill-color": "#000000",
"fill-outline-color": "#000000",
"fill-translate": [0, 0],
"fill-translate-anchor": "map"
(2) line
line
:线(用于绘制成一条条线)
"layers": [
"id": "line-id",
"type": "line",
"metadata": {
"mapbox:name": "test"
"source": "source-name",
"source-layer": "source-layer-name",
"minzoom": 0,
"maxzoom": 24,
"filter": [],
"layout": {
"visibility": "visible",
"line-cap": "butt",
"line-join": "miter",
"line-miter-limit": 2,
"line-round-limit": 1.05,
"paint": {
"line-opacity": 1,
"line-pattern": "",
"line-color": "#000000",
"line-translate": [0, 0],
"line-translate-anchor": "map",
"line-width": 1,
"line-gap-width": 0,
"line-offset": 0,
"line-blur": 0,
"line-dasharray": [0, 0],
"line-gradient": "#000000",
(3) circle
circle
:圆点(用于绘制成一个个圆点)
"layers": [
"id": "circle-id",
"type": "circle",
"metadata": {
"mapbox:name": "test"
"source": "source-name",
"source-layer": "source-layer-name",
"minzoom": 0,
"maxzoom": 24,
"filter": [],
"layout": {
"visibility": "visible",
"paint": {
"circle-opacity": 1,
"circle-radius": 5,
"circle-color": "#000000",
"circle-blur": 0,
"circle-translate": [0, 0],
"circle-translate-anchor": "map",
"circle-pitch-scale": "map",
"circle-pitch-alignment": "map",
"circle-stroke-width": 0,
"circle-stroke-color": "#000000",
"circle-stroke-opacity": 1
(4) symbol
symbol
:符号(用于绘制成一个个图标或者文本标签等)
"layers": [
"id": "symbol-id",
"type": "symbol",
"metadata": {
"mapbox:name": "test"
"source": "source-name",
"source-layer": "source-layer-name",
"minzoom": 0,
"maxzoom": 24,
"filter": [],
"layout": {
"visibility": "visible",
"symbol-placement": "point",
"symbol-spacing": 250,
"symbol-avoid-edges": false,
"symbol-sort-key": 1,
"symbol-z-order": "auto",
"icon-image": "",
"icon-size": 1,
"icon-padding": 2,
"icon-offset": [0, 0],
"icon-anchor": "center",
"icon-rotate": 0,
"icon-allow-overlap": false,
"icon-ignore-placement": false,
"icon-optional": false,
"icon-text-fit": "none",
"icon-text-fit-padding": [0, 0, 0, 0],
"icon-keep-upright": false,
"icon-rotation-alignment": "auto",
"icon-pitch-alignment": "auto",
"text-rotation-alignment": "auto",
"text-pitch-alignment": "auto",
"text-field": "",
"text-font": ["Open Sans Regular","Arial Unicode MS Regular"],
"text-size": 16,
"text-max-width": 10,
"text-line-height": 1.2,
"text-letter-spacing": 0,
"text-justify": "center",
"text-anchor": "center",
"text-variable-anchor": "center",
"text-max-angle": 45,
"text-rotate": 0,
"text-padding": 2,
"text-keep-upright": false,
"text-transform": "none",
"text-offset": [0, 0],
"text-radial-offset": 0,
"text-allow-overlap": false,
"text-ignore-placement": false,
"text-optional": false
"paint": {
"icon-opacity": 1,
"icon-color": "#000000",
"icon-halo-color": "rgba(0,0,0,0)",
"icon-halo-width": 0,
"icon-halo-blur": 0,
"icon-translate": [0, 0],
"icon-translate-anchor": "map",
"text-opacity": 1,
"text-color": "#000000",
"text-halo-color": "rgba(0,0,0,0)",
"text-halo-width": 0,
"text-halo-blur": 0,
"text-translate": [0, 0],
"text-translate-anchor": "map",
(5) background
background
:背景(用于绘制成整个地图的背景或者图案)
"layers": [
"id": "background-id",
"type": "background",
"metadata": {
"mapbox:name": "test"
"minzoom": 0,
"maxzoom": 24,
"layout": {
"visibility": "visible",
"paint": {
"background-color": "#000000",
"background-pattern": "",
"background-opacity": 1
(6) raster
raster
:栅格(用于绘制栅格地图,比如卫星影像)
"layers": [
"id": "raster-id",
"type": "raster",
"metadata": {
"mapbox:name": "test"
"source": "source-name",
"source-layer": "source-layer-name",
"minzoom": 0,
"maxzoom": 24,
"filter": [],
"layout": {
"visibility": "visible",
"paint": {
"raster-opacity": 1,
"raster-hue-rotate": 0,
"raster-brightness-min": 0,
"raster-brightness-max": 1,
"raster-saturation": 0,
"raster-contrast": 0,
"raster-resampling": "linear",
"raster-fade-duration": 300
(7) heatmap
heatmap
:热力图(用于绘制成热力图的效果)
"layers": [
"id": "heatmap-id",
"type": "heatmap",
"metadata": {
"mapbox:name": "test"
"source": "source-name",
"source-layer": "source-layer-name",
"minzoom": 0,
"maxzoom": 24,
"filter": [],
"layout": {
"visibility": "visible",
"paint": {
"heatmap-opacity": 1,
"heatmap-radius": 30,
"heatmap-weight": 1,
"heatmap-intensity": 1,
"heatmap-color": [
"interpolate", ["linear"], ["heatmap-density"],
0, "rgba(0, 0, 255, 0)",
0.1, "royalblue",
0.3, "cyan",
0.5, "lime",
0.7, "yellow",
1, "red"
(8) hillshade
hillshade
:坡面阴影(基于 DEM
数字高程模型进行坡面阴影的可视化渲染)
"layers": [
"id": "hillshade-id",
"type": "hillshade",
"metadata": {
"mapbox:name": "test"
"source": "source-name",
"source-layer": "source-layer-name",
"minzoom": 0,
"maxzoom": 24,
"filter": [],
"layout": {
"visibility": "visible",
"paint": {
"hillshade-illumination-direction": 335,
"hillshade-illumination-anchor": "viewport",
"hillshade-exaggeration": 0.5,
"hillshade-shadow-color": "#000000",
"hillshade-highlight-color": "#ffffff",
"hillshade-accent-color": "#000000"
(9) fill-extrusion
fill-extrusion
:三维填充(用于给三维多边形进行填充和描边)
"layers": [
"id": "fill-extrusion-id",
"type": "fill-extrusion",
"metadata": {
"mapbox:name": "test"
"source": "source-name",
"source-layer": "source-layer-name",
"minzoom": 0,
"maxzoom": 24,
"filter": [],
"layout": {
"visibility": "visible",
"paint": {
"fill-extrusion-opacity": 1,
"fill-extrusion-pattern": "",
"fill-extrusion-color": "#000000",
"fill-extrusion-translate": [0, 0],
"fill-extrusion-translate-anchor": "map",
"fill-extrusion-height": 0,
"fill-extrusion-base": 0,
"fill-extrusion-vertical-gradient": true,
14. Expressions
Expressions
:表达式集合(并非 style
的属性,只是 layer
的任何 layout
布局属性和 paint
绘制属性,以及 filter
属性等,它们的值都可以指定成一个表达式 Expression
)
一个 Expression
定义了一个公式,总体来说可以将公式中的操作符分为以下 5
种:
Mathematical operators
:数学操作符,用来对数值进行数学运算
Logical operators
:逻辑操作符,用来计算布尔值和条件控制
String operators
:字符串操作符,用来操作字符串
Data operators
:数据操作符,用来访问数据源中的要素 feature
Camera operators
:照相机操作符,用来访问当前地图视图的各个参数
Expressions
是 Expression
的集合。而 Expression
是以 JSON
数组的形式来表示的,数组的第一个元素是 Expression
的操作符的名称,后续的元素表示操作的参数(也可以是一个 Expression
)。
[expression_name, argument_0, argument_1, expression_1, ...]
由以上 5
种操作符,相应地可以推出 5
种表达式集合 Expressions
,并且相互之间可以组合使用:
Mathematical expressions
Logical expressions
String expressions
Data expressions
Camera expressions
这里主要讲述 Data expressions
和 Camera expressions
。
(1) Data expressions
一个 data expression
是可以访问要素数据的任何表达式。而这些表达式使用了以下至少一种数据操作符:
get
:用于获取要素的属性值,格式为 ["get", "property_name"]
,余下具体的可以看 Expression reference
geometry-type
properties
feature-state
通过 data expression
可以实现区分同一个图层中的不同要素,并以不同的形式呈现。比如设置颜色 circle-color
:
"circle-color": [
"rgb",
["get", "temperature"],
0,
["-", 100, ["get", "temperature"]]
需要注意的是,并非所有的 layout
布局类属性和 paint
绘制类属性都支持 data expression
:
具体可以看 SDK Support
中的 data-driven styling
那一行;
而且使用了 feature-state
操作符的 data expression
仅在 paint
绘制类属性中可用。
以下是官网中记录的暂不支持数据表达式 data expression
的属性:
"fill-antialias",
"fill-translate",
"fill-translate-anchor",
"line-cap",
"line-miter-limit",
"line-round-limit",
"visibility",
"line-translate",
"line-translate-anchor",
"line-dasharray",
"line-gradient",
"symbol-placement",
"symbol-spacing",
"symbol-avoid-edges",
"symbol-z-order",
"icon-allow-overlap",
"icon-ignore-placement",
"icon-optional",
"icon-rotation-alignment",
"icon-text-fit",
"icon-text-fit-padding",
"icon-padding",
"icon-keep-upright",
"icon-pitch-alignment",
"text-pitch-alignment",
"text-rotation-alignment",
"text-line-height",
"text-variable-anchor",
"text-max-angle",
"text-padding",
"text-keep-upright",
"text-allow-overlap",
"text-ignore-placement",
"text-optional",
"icon-translate",
"icon-translate-anchor",
"text-translate",
"text-translate-anchor",
"raster-opacity",
"raster-hue-rotate",
"raster-brightness-min",
"raster-brightness-max",
"raster-saturation",
"raster-contrast",
"raster-resampling",
"raster-fade-duration",
"circle-translate",
"circle-translate-anchor",
"circle-pitch-scale",
"circle-pitch-alignment",
"fill-extrusion-translate",
"fill-extrusion-translate-anchor",
"heatmap-intensity",
"heatmap-color",
"heatmap-opacity",
"hillshade-illumination-direction",
"hillshade-illumination-anchor",
"hillshade-exaggeration",
"hillshade-shadow-color",
"hillshade-highlight-color",
"hillshade-accent-color"
(2) Camera expressions
一个 camera expression
是使用了 zoom
操作符的任何表达式。
通过 camera expression
可以实现图层 layer
根据地图的缩放层级 zoom
有不同的表现。 比如设置半径 circle-radius
:
"circle-radius": [
"interpolate", ["linear"], ["zoom"],
5, 1,
10, 5
所有可以使用 Expression
的属性都支持 camera expression
。不过当用于 layout
布局类属性和 paint
绘制类属性时,必须是以下几种格式:
[ "interpolate", interpolation, ["zoom"], ... ]
[ "step", ["zoom"], ... ]
"let",
... variable bindings...,
[ "interpolate", interpolation, ["zoom"], ... ]
"let",
... variable bindings...,
[ "step", ["zoom"], ... ]
为什么呢?因为 ["zoom"]
在 layout
布局类属性和 paint
绘制类属性中仅作为 interpolate
或 step
操作的输入参数。
需要注意,layout
布局类属性和 paint
绘制类属性有一个很重要的区别:
layout
布局类属性中使用的 camera expression
只有在 zoom
的值是 整数变化
时才会重新计算。
paint
绘制类型属性中使用的 camera expression
在zoom
的值是 小数变化
时也会重新计算。比如 zoom
从 4.1
变为 4.6
。
15. Expression reference
前面介绍了表达式集合 Expressions
,简单地讲述了其中的 Data expressions
和 Camera expressions
,而这些表达式里涉及和很多的操作符,这里就对每个操作符进行分类介绍,作为表达式的参考 Expression reference
。
主要分为以下几类操作符:
Types
Feature data
Lookup
Decision
Decision
Variable binding
String
Color
Heatmap
(1) Types
Types
:这类操作符用于 断言
和 转换
数据的类型,包含的操作符如下:
["string", value]: string
["string", value, fallback: value, fallback: value, ...]: string
["boolean", value]: boolean
["boolean", value, fallback: value, fallback: value, ...]: boolean
["number", value]: number
["number", value, fallback: value, fallback: value, ...]: number
["number-format",
input: number,
options: { "locale": string, "currency": string, "min-fraction-digits": number, "max-fraction-digits": number }
]: string
["object", value]: object
["object", value, fallback: value, fallback: value, ...]: object
["array", value]: array
["array", type: "string" | "number" | "boolean", value]: array<type>
["array", type: "string" | "number" | "boolean", N: number (literal), value]: array<type, N>
["literal", [...] (JSON array literal)]: array<T, N>
["literal", {...} (JSON object literal)]: Object
["collator", { "case-sensitive": boolean, "diacritic-sensitive": boolean, "locale": string }]: collator
["format",
input_1: string, options_1: { "font-scale": number, "text-font": array<string> },
input_n: string, options_n: { "font-scale": number, "text-font": array<string> }
]: formatted
["to-string", value]: string
["to-boolean", value]: boolean
["to-number", value, fallback: value, fallback: value, ...]: number
["to-color", value, fallback: value, fallback: value, ...]: color
["typeof", value]: string
(2) Feature data
Feature data
:这类操作符用于操作要素的数据。
["accumulated"]: value
["feature-state", string]: value
["geometry-type"]: string
["id"]: value
["line-progress"]: number
["properties"]: object
(3) Lookup
Lookup
:这类操作符用于查找并获取值
["at", number, array]: ItemType
["get", string]: value
["get", string, object]: value
["has", string]: value
["has", string, object]: value
["length", string | array | value]: number
(4) Decision
Decision
:这类操作符用于条件判断
["!", boolean]: boolean
["!=", value, value]: boolean
["!=", value, value, collator]: boolean
["<", value, value]: boolean
["<", value, value, collator]: boolean
["<=", value, value]: boolean
["<=", value, value, collator]: boolean
["==", value, value]: boolean
["==", value, value, collator]: boolean
[">", value, value]: boolean
[">", value, value, collator]: boolean
[">=", value, value]: boolean
[">=", value, value, collator]: boolean
["all", boolean, boolean]: boolean
["all", boolean, boolean, ...]: boolean
["any", boolean, boolean]: boolean
["any", boolean, boolean, ...]: boolean
["case",
condition: boolean, output: OutputType,
condition: boolean, output: OutputType,
fallback: OutputType
]: OutputType
["coalesce", OutputType, OutputType, ...]: OutputType
["match",
input: InputType (number or string),
label: InputType | [InputType, InputType, ...], output: OutputType,
label: InputType | [InputType, InputType, ...], output: OutputType,
fallback: OutputType
]: OutputType
(5) Ramps, scales, curves
Ramps, scales, curves
:这类操作符用于渐变、缩放、曲线等特殊效果的设置。
["interpolate",
interpolation: ["linear"] | ["exponential", base] | ["cubic-bezier", x1, y1, x2, y2 ],
input: number,
stop_input_1: number, stop_output_1: OutputType,
stop_input_n: number, stop_output_n: OutputType, ...
]: OutputType (number, array<number>, or Color)
["interpolate-hcl",
interpolation: ["linear"] | ["exponential", base] | ["cubic-bezier", x1, y1, x2, y2 ],
input: number,
stop_input_1: number, stop_output_1: Color,
stop_input_n: number, stop_output_n: Color, ...
]: Color
["interpolate-lab",
interpolation: ["linear"] | ["exponential", base] | ["cubic-bezier", x1, y1, x2, y2 ],
input: number,
stop_input_1: number, stop_output_1: Color,
stop_input_n: number, stop_output_n: Color, ...
]: Color
["step",
input: number,
stop_output_0: OutputType,
stop_input_1: number, stop_output_1: OutputType,
stop_input_n: number, stop_output_n: OutputType, ...
]: OutputType
(6) Variable binding
Variable binding
:这类操作符用于变量绑定。
["let",
string (alphanumeric literal), any, string (alphanumeric literal), any, ...,
OutputType
]: OutputType
["var", previously bound variable name]: the type of the bound expression
(7) String
String
:这类操作符用于操作字符串。
["concat", value, value, ...]: string
["downcase", string]: string
["upcase", string]: string
["resolved-locale", collator]: string
["is-supported-script", string]: boolean
(8) Color
Color
:这类操作符用于操作颜色。
["rgb", number, number, number]: color
["rgba", number, number, number, number]: color
["to-rgba", color]: array<number, 4>
(9) Math
Math
:这类操作符用于数学运算。
["+", number, number, ...]: number
["-", number, number]: number
["-", number]: number
["*", number, number, ...]: number
["/", number, number]: number
["%", number, number]: number
["^", number, number]: number
["abs", number]: number
["acos", number]: number
["asin", number]: number
["atan", number]: number
["ceil", number]: number
["cos", number]: number
["e"]: number
["floor", number]: number
["ln", number]: number
["ln2"]: number
["log10", number]: number
["log2", number]: number
["max", number, number, ...]: number
["min", number, number, ...]: number
["pi"]: number
["round", number]: number
["sin", number]: number
["sqrt", number]: number
["tan", number]: number
(10) Zoom
Zoom
:这类操作符只包含一个操作符 zoom
,用于获取当前地图的缩放层级。
["zoom"]: number
(11) Heatmap
Heatmap
:这类操作符只包含一个操作符 heatmap-density
,用于获取热力图的密度(特定像素内有多少个数据点),只能在 heatmap-color
中使用。
["heatmap-density"]: number
16. Functions
之前介绍了表达式集合 Expressions
,我们知道了 layout
布局类属性和 paint
绘制类属性的值都可以设为一个表达式 Expression
。
同样地,函数 Function
也可以作为其 layout
布局类属性和 paint
绘制类属性的属性值。
需要注意的是,在使用 Function
作为属性值时,实际上是一个对象 {}
。
ps:不晓得 Function
翻译成 “函数” 对不对,还是说翻译成 “功能”......
Functions
是 Function
的集合。Function
可以用来根据 地图缩放层级
和 地图要素的属性
来控制地图要素的呈现。所以可以分为三类:
Zoom functions
Property functions
Zoom-and-property functions
(1) Zoom functions
一个 zoom function
允许地图的呈现根据 地图的缩放层级
而改变。
"circle-radius": {
"stops": [
[5, 1],
[10, 2]
"base": 1,
"type": "interval",
"defaul": 1,
"colorSpace": "rgb",
(2) Property functions
一个 property function
允许地图的呈现根据 地图要素的属性
而改变。
"circle-color": {
"property": "temperature",
"stops": [
[0, "blue"],
[100, "red"]
"base": 1,
"type": "interval",
"defaul": "#000000",
"colorSpace": "rgb",
(3) Zoom-and-property functions
一个 zoom-property function
允许地图的呈现根据 地图的缩放层级
和 地图要素的属性
而改变。
"circle-radius": {
"property": "rating",
"stops": [
[{zoom: 0, value: 0}, 0],
[{zoom: 0, value: 5}, 5],
[{zoom: 20, value: 0}, 0],
[{zoom: 20, value: 5}, 20]
"base": 1,
"type": "interval",
"defaul": "#000000",
"colorSpace": "rgb",
(完)