レイヤー
スタイルのlayers
プロパティは、そのスタイルで使用可能なすべてのレイヤーをリストします。レイヤーのタイプは"type"
プロパティで指定され、background, fill, line, symbol, raster, raster-particle, circle, fill-extrusion, heatmap, hillshade, sky, model のいずれかである必要があります。
backgroundまたはskyタイプのレイヤー除いて、各レイヤーはソースを参照する必要があります。レイヤーはソースから得られたデータを受け取り、必要に応じてフィルター処理を行い、その機能がどのようにスタイルされるかを定義します。
以下はスタイルに含まれる可能性のあるlayers
オブジェクトの例です:
"layers": [
{
"id": "water",
"source": "mapbox-streets",
"source-layer": "water",
"type": "fill",
"paint": {
"fill-color": "#00ffff"
}
}
]
レイヤープロパティ
id
Unique layer name.
type
"fill"
, "line"
, "symbol"
, "circle"
, "heatmap"
, "fill-extrusion"
, "raster"
, "raster-particle"
, "hillshade"
, "model"
, "background"
, "sky"
, "slot"
, "clip"
. Rendering type of this layer.
"fill"
:A filled polygon with an optional stroked border.
"line"
:A stroked line.
"symbol"
:An icon or a text label.
"circle"
:A filled circle.
"heatmap"
:A heatmap.
"fill-extrusion"
:An extruded (3D) polygon.
"raster"
:Raster map textures such as satellite imagery.
"raster-particle"
:Particle animation driven by textures such as wind maps.
"hillshade"
:Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.
"model"
:A 3D model
"background"
:The background color or pattern of the map.
"sky"
:A spherical dome around the map that is always rendered behind all other layers.
"slot"
:Marks the position of a slot.
"clip"
:Layer that removes 3D content from map.
filter
An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The ["feature-state", ...]
expression is not supported in filter expressions. The ["pitch"]
and ["distance-from-center"]
expressions are supported only for filter expressions on the symbol layer.
layout
Layout properties for the layer.