使用传单热图控制热图的不透明度 [英] control the opacity of heatmap using leaflet heatmap
本文介绍了使用传单热图控制热图的不透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用leaflet.js,heatmap插件。
I am using leaflet.js , heatmap plugin.
有一个名为L.heatLayer的小类(源代码 https://github.com/Leaflet/Leaflet.heat/blob/gh-pages/src/HeatLayer.js )
There is one tiny class called L.heatLayer (source code https://github.com/Leaflet/Leaflet.heat/blob/gh-pages/src/HeatLayer.js)
没有不透明度的选项
这些选项只是
options: {
maxZoom: 18,
radius: 25,
blur: 15,
max: 1.0},
有什么方法可以使用这个leaflet.js heatLayer控制不透明度?非常感谢
Is there any way I can control the opacity using this leaflet.js heatLayer ? Thank you very much
推荐答案
你可以通过css完成。 Heatmap是类leaflet-heatmap-layer的画布
You can do it through css. Heatmap is a canvas of class leaflet-heatmap-layer
.leaflet-heatmap-layer {
opacity: .5;
}
这篇关于使用传单热图控制热图的不透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文