new Wind(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
- Source:
- View2D/Visuals/Custom/Wind.js
Example
//构造地图对象 var map = new GeoGlobe.Map({ style: Cfg.style, container: 'map', zoom: 11, bearing: 0, pitch: 0, center: [114.77402594421665, 30.28162351834304] }); //构造可视化定制图层 var custom = new GeoGlobe.Visuals.Custom(); //添加到地图中 custom.addTo(map); //构造风向图层 var wind = new GeoGlobe.Visuals.Custom.Wind({ id: "wind_1", data: data, visibility: true, rendererOptions: { velocityScale: 0.011, particleMultiplier: 0.002, maxWindIntensity: 30, lineWidth: 2, opacity: 0.6, colors: [ '#00ffff', '#64f0ff', '#87e1ff', '#a0d0ff', '#b5c0ff', '#c6adff', '#d49bff', '#e185ff', '#ec6dff', '#ff1edb' ] } }); //添加到可视化定制图层 wind.addTo(custom); //绘制 custom.render();
Members
-
canvas :Object
-
画布
Type:
- Object
- Source:
- View2D/Visuals/Custom/Wind.js
-
canvasContext :Object
-
画布2d上下文
Type:
- Object
- Source:
- View2D/Visuals/Custom/Wind.js
Methods
-
addTo(custom)
-
关联可视化定制图层对象
Parameters:
Name Type Description custom
GeoGlobe.Visuals.Custom 可视化定制图层对象 - Source:
- View2D/Visuals/Custom/Wind.js
-
clearCanvas()
-
画布清空
- Source:
- View2D/Visuals/Custom/Wind.js
-
destroy()
-
画布销毁
- Source:
- View2D/Visuals/Custom/Wind.js
-
draw()
-
图层绘制
- Source:
- View2D/Visuals/Custom/Wind.js
-
initialize(options)
-
构造函数
Parameters:
Name Type Description options
Object 参数对象 - Source:
- View2D/Visuals/Custom/Wind.js
-
onMove()
-
图层(地图)移动时触发
- Source:
- View2D/Visuals/Custom/Wind.js
-
onMoveEnd()
-
图层(地图)移动结束时触发
- Source:
- View2D/Visuals/Custom/Wind.js
-
onResize()
-
图层自适应
- Source:
- View2D/Visuals/Custom/Wind.js
-
redraw()
-
图层重绘
- Source:
- View2D/Visuals/Custom/Wind.js
-
render()
-
渲染图层
- Source:
- View2D/Visuals/Custom/Wind.js
-
setData(data)
-
数据的处理
Parameters:
Name Type Description data
Array 数据 - Source:
- View2D/Visuals/Custom/Wind.js
-
setVisible(visibility)
-
图层的显示与隐藏
Parameters:
Name Type Description visibility
Boolean 可见性 - Source:
- View2D/Visuals/Custom/Wind.js
-
stopDraw()
-
停止绘制
- Source:
- View2D/Visuals/Custom/Wind.js