1:mapbox 更改图层属性
map.setPaintProperty(layer, 'fill-opacity', 1);
2:mapbox 更改图层数据源
map.getSource(source).setData(cityHeatDatas);
3:mapbox 获取当前地图已添加的图层layers及数据源sources
const layers = map.getStyle().layers;
const sources= map.getStyle().sources;
4:mapbox添加热力图heat-weight表达式
"heatmap-weight": ["/", ["get", "value"], heatWeight],
来源:CSDN
作者:炉火纯青-旺
链接:https://blog.csdn.net/qq_34870529/article/details/104348202