new DeckGL()
- Source:
- View2D/Visuals/DeckGL.js
Example
//构造地图对象 var map = new GeoGlobe.Map({ style: Cfg.style, container: 'map', zoom: 6.6, bearing: -27.396674584323023, pitch: 40.5, units: "degrees", center: [-1.4157267858730052,52.232395363869415] }); //构造DeckGL可视化图层 var deckgl = new GeoGlobe.Visuals.DeckGL(); //绑定初始构建事件 deckgl.on('overlayerinit', function(e){ }); //绑定鼠标点击事件 deckgl.on('overlayerclick', function(e,a,b){ }); //绑定鼠标移动事件 deckgl.on('overlayerhover', function(e,a,b){ }) //添加到地图中 deckgl.addTo(map);
Classes
Members
-
container :Object
-
map的容器
Type:
- Object
- Source:
- View2D/Visuals/DeckGL.js
-
layers :Array
-
图层容器
Type:
- Array
- Source:
- View2D/Visuals/DeckGL.js
-
map :GeoGlobe.Map
-
地图对象
Type:
- Default Value:
-
- null
- Source:
- View2D/Visuals/DeckGL.js
-
type :String
-
可视化图层类别
Type:
- String
- Default Value:
-
- 'deckgl'
- Source:
- View2D/Visuals/DeckGL.js
Methods
-
addLayer(layer)
-
向DeckGLjs可视化图层中添加子图层
Parameters:
Name Type Description layer
Object DeckGL命名空间下的子图层对象 - Source:
- View2D/Visuals/DeckGL.js
-
addTo(map)
-
与gl地图对象关联
Parameters:
Name Type Description map
Object gl地图对象 - Source:
- View2D/Visuals/DeckGL.js
-
getLayer(id)
-
获取指定id图层
Parameters:
Name Type Description id
string 图层id. - Source:
- View2D/Visuals/DeckGL.js
Returns:
Layer -
moveLayer(id, before)
-
移动图层
Parameters:
Name Type Description id
String 要移动的图层的ID before
String 之前插入新图层的现有图层的ID。如果省略此参数,则新图层将移动到最上层 - Source:
- View2D/Visuals/DeckGL.js
-
remove()
-
移除图层容器
- Source:
- View2D/Visuals/DeckGL.js
-
removeLayer(id)
-
移除图层
Parameters:
Name Type Description id
string 图层id - Source:
- View2D/Visuals/DeckGL.js
-
render()
-
绘制图层,包含子图层
- Source:
- View2D/Visuals/DeckGL.js