new HoneyComb()
- Source:
- View2D/Visuals/MapV/HoneyComb.js
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
//构造MapV可视化图层
var mapV = new GeoGlobe.Visuals.MapV();
//添加到地图中
mapV.addTo(map);
//构造蜂巢图层
var honeyComb = new GeoGlobe.Visuals.MapV.HoneyComb({
id: 'honeyComb_1',
visibility: true,
dragdrawing: true,
data: [{
"type": "Feature",
"properties": {count:5.516636266964161,time:16.231042218116176},
"geometry": {
"type": "Point",
"coordinates": [123.3192464663197, 43.91886355937628]
}
}],
rendererOptions: {
fillStyle: 'rgba(55, 50, 250, 0.8)',
shadowColor: "rgba(255,250,50,1)",
shadowBlur: 20,
max: 100,
size: 50,
label: {
show: true,
fillStyle:'white'
},
globalAlpha: 0.5,
gradient: {0.25:"rgb(0,0,255)",0.55:"rgb(0,255,0)",0.85: "yellow", 1.0: "rgb(255,0,0)"}
}
});
//添加到MapV可视化图层
honeyComb.addTo(mapV);
//绘制
mapV.render();
Members
-
visibility :Boolean
-
图层可见性
Type:
- Boolean
- Default Value:
-
- true
- Source:
- View2D/Visuals/MapV/HoneyComb.js
Methods
-
addTo(mapV)
-
关联mapV
Parameters:
Name Type Description mapV
GeoGlobe.Visuals.MapV - Source:
- View2D/Visuals/MapV/HoneyComb.js
-
destroy()
-
销毁图层
- Source:
- View2D/Visuals/MapV/HoneyComb.js
-
remove()
-
从父对象中移除自己
- Source:
- View2D/Visuals/MapV/HoneyComb.js
-
render()
-
绘制
- Source:
- View2D/Visuals/MapV/HoneyComb.js
-
setData(data)
-
数据的处理
Parameters:
Name Type Description data
Array 数据,geojson格式 - Source:
- View2D/Visuals/MapV/HoneyComb.js
-
setVisible(visibility)
-
图层的显示与隐藏
Parameters:
Name Type Description visibility
Boolean 可见性 - Source:
- View2D/Visuals/MapV/HoneyComb.js