Mapbox有一个示例热图页。有几次,规范中出现了4个数字(0,0,6,1
、0,1,9,3
、0,2,9,20
和7,1,9,0
):
// Increase the heatmap weight based on frequency and property magnitude
'heatmap-weight': [
'interpolate',
['linear'],
['get', 'mag'],
0,
0,
6,
1
],
或者:
// Increase the heatmap color weight weight by zoom level
// heatmap-intensity is a multiplier on top of heatmap-weight
'heatmap-intensity': [
'interpolate',
['linear'],
['zoom'],
0,
1,
9,
3
],
或者:
// Adjust the heatmap radius by zoom level
'heatmap-radius': [
'interpolate',
['linear'],
['zoom'],
0,
2,
9,
20
],
// Transition from heatmap to circle layer by zoom level
'heatmap-opacity': [
'interpolate',
['linear'],
['zoom'],
7,
1,
9,
0
]
此页解释了热图权重、热图强度、热图半径和热图不透明度的概念,上面的代码涉及:
heatmap-weight:测量每个点对热图外观的贡献程度。在默认情况下,热图层的权重为1,这意味着所有点的加权都是相等的。将热图重量属性增加到5,效果与在同一位置放置5分相同。可以使用stop函数根据指定的属性设置点数的权重。 heatmap-intensity:热图权上的乘法器,主要用作根据缩放级别调整热图外观的方便方法。 heatmap-radius:为每个点设置以像素为单位的半径。半径越大,热图越平滑,细节越少。 heatmap-opacity:控制热图层的全局不透明度。
然而,我不清楚每一个反复出现的4个数字代表什么。
这四个数字是如何与热图重量、热图强度、热图半径和热图不透明度的关系的?。
发布于 2022-07-28 10:13:38
https://stackoverflow.com/questions/73150892
复制相似问题