initLayer(options, beforeId) {
this.map.addLayer(
{
id: options.id,
type: options.type,
source: options.source,
layout: options.layout,
paint: options.paint,
},
beforeId,
)
},
2:
if (_this.map.getLayer('markerPoint') && _this.map.getLayer('areaMapFill')) {
_this.map.moveLayer('areaMapFill', 'markerPoint')
_this.map.moveLayer('areaMapLine', 'markerPoint')
}
3:/ 层级越高越在上层
paint: {
"fill-opacity": 0.9,
"fill-color": "#00f"
},
metadata:{
zIndex: 1
}