Class: MapV

.Visuals. MapV

基于MapV的可视化图层

new MapV()

Author:
  • kz
Source:
View2D/Visuals/MapV.js
Example
//构造地图对象
 var map = new GeoGlobe.Map({
    style: Cfg.style,
    container: 'map',
    zoom: 16,
    bearing: 0,
	pitch: 0,
    units: "degrees",
    center: [114.20509630753577, 30.776055193053764]
 });
 //构造MapV可视化图层
 var mapV = new GeoGlobe.Visuals.MapV();
 //添加到地图中
 mapV.addTo(map);
 //绑定鼠标点击事件
 mapV.on('overlayerclick', function(e){
	console.info(e);
 });
 //绑定鼠标移动事件
 mapV.on('overlayerhover', function(e){
	console.info(e);
 });
 //构造简单图层
 var simple = new GeoGlobe.Visuals.MapV.Simple({
    id: 'simple_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.2)',
        globalCompositeOperation: "lighter",
        size: 15,
        animation: {
            type: 'time',
            stepsRange: {
                start: 0,
                end: 100
            },
            trails: 10,
            duration: 5
        }
    }
 });
 //添加到MapV可视化图层
 simple.addTo(mapV);
 //绘制
 mapV.render();

Classes

Bubble
Category
Choropleth
Grid
HeatMap
HoneyComb
Icon
Intensity
Simple
Text

Members


container :Object

map的容器
Type:
  • Object
Source:
View2D/Visuals/MapV.js

layers :Array

图层集合
Type:
  • Array
Source:
View2D/Visuals/MapV.js

map :GeoGlobe.Map

地图对象
Type:
Default Value:
  • null
Source:
View2D/Visuals/MapV.js

type :String

可视化图层类别
Type:
  • String
Default Value:
  • 'mapv'
Source:
View2D/Visuals/MapV.js

Methods


addLayer(layer)

向可视化图层中添加子图层
Parameters:
Name Type Description
layer Object 子图层对象
Source:
View2D/Visuals/MapV.js

addTo(map)

与地图对象关联
Parameters:
Name Type Description
map Object 地图对象
Source:
View2D/Visuals/MapV.js

getLayer(id)

获取指定id图层
Parameters:
Name Type Description
id String 图层id
Source:
View2D/Visuals/MapV.js
Returns:
layer 图层对象
Type
Object

moveLayer(id, before)

移动图层
Parameters:
Name Type Description
id String 要移动的图层的ID
before String 之前插入新图层的现有图层的ID。如果省略此参数,则新图层将移动到最上层
Source:
View2D/Visuals/MapV.js

remove()

移除图层容器
Source:
View2D/Visuals/MapV.js

removeLayer(id)

移除图层
Parameters:
Name Type Description
id String 图层id
Source:
View2D/Visuals/MapV.js

render()

绘制图层
Source:
View2D/Visuals/MapV.js