Constructor
new PolygonLayer()
Example
//构造地图对象
var map = new GeoGlobe.Map({
	style: Cfg.style,
	container: 'map',
	zoom: 11,
	bearing: 0,
	pitch: 45,
	units: "degrees",
	center: [-123.13,49.254]
});
//构造DeckGL可视化图层
var deckgl = new GeoGlobe.Visuals.DeckGL();
//绑定初始构建事件
deckgl.on('overlayerinit', function(o){
	o.param.enable(o.param.DEPTH_TEST);
	o.param.depthFunc(o.param.LEQUAL);
});
//绑定鼠标点击事件
deckgl.on('overlayerclick', function(e,a,b){
});
//绑定鼠标移动事件
deckgl.on('overlayerhover', function(o,a,b){
})
//添加到地图中
deckgl.addTo(map);
//构造图层
var polygonLayer = new GeoGlobe.Visuals.DeckGL.PolygonLayer({
	id: 'polygon-layer',
	data: [
		{ "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [ 114.22313690185547, 30.51213917605451 ], [ 114.29986953735351, 30.51213917605451 ], [ 114.29986953735351, 30.5665474527005 ], [ 114.22313690185547, 30.5665474527005 ], [ 114.22313690185547, 30.51213917605451 ] ] ] } }
	],
	visible: true,
	pickable: true,
	fp64: false,
	stroked: false,
	filled: true,
	extruded: true,
	wireframe: false,
	getFillColor: function(d){if(d.height>380){return [255,10,10];} else{return [240,143,96];}}
});
        
        Members
data :Array
    geojson结构
    Type:
- Array
 
Example
[{
"type": "Feature",
"properties": {
		"id": 10001,
		"name": "正方形"
	},
"geometry": {
		"type": "Polygon",
		"coordinates": [ [ [ 114.22313690185547, 30.51213917605451 ], [ 114.29986953735351, 30.51213917605451 ], [ 114.29986953735351, 30.5665474527005 ], [ 114.22313690185547, 30.5665474527005 ], [ 114.22313690185547, 30.51213917605451 ] ] ]
	}
}]
        
            
elevationScale :Int
- Default Value:
 - 1
 
    高程乘数。 最终高程由elevationScale * getElevation(d)计算。 elevationScale是一个方便的属性,可以在不更新数据的情况下缩放所有多边形高程。
    Type:
- Int
 
extruded :Boolean
- Default Value:
 - false
 
    如果设置为true,则沿z轴挤出Polygon和MultiPolygon要素。 使用getElevation访问器获取绘制要素的高度。
    Type:
- Boolean
 
filled :Boolean
- Default Value:
 - true
 
    是否绘制填充多边形(固体填充)。请注意,对于每个多边形,只有外部多边形和任何孔之间的区域将被填充。只有当多边形没有被挤压时,这个支柱才是有效的。
    Type:
- Boolean
 
fp64 :Boolean
- Default Value:
 - true
 
    是否开启高精度64位模式
    Type:
- Boolean
 
id :String
- Default Value:
 - '1'
 
    图层id
    Type:
- String
 
lightSettings :Object
- Default Value:
 - {}
 
    灯光设置的对象
    Type:
- Object
 
lineJointRounded :Boolean
- Default Value:
 - false
 
    关节类型。 如果是,则绘制圆形关节。 否则绘制斜接接头。
    Type:
- Boolean
 
lineMiterLimit :Int
- Default Value:
 - 4
 
    关节的最大范围与笔划宽度的比率。 仅在lineJointRounded为false时有效。
    Type:
- Int
 
lineWidthMaxPixels :Int
- Default Value:
 - Number.MAX_SAFE_INTEGER
 
    最大线宽(以像素为单位)。
    Type:
- Int
 
lineWidthMinPixels :Int
- Default Value:
 - 0
 
    最小线宽(以像素为单位)。
    Type:
- Int
 
lineWidthScale :Int
- Default Value:
 - 1
 
    如果stroked属性为true,则线宽乘数乘以所有线,包括LineString和MultiLineString要素以及Polygon和MultiPolygon要素的轮廓。
    Type:
- Int
 
name :String
- Default Value:
 - ''
 
    图层名称
    Type:
- String
 
pickable :Boolean
- Default Value:
 - true
 
    是否开启鼠标拾取
    Type:
- Boolean
 
stroked :Boolean
- Default Value:
 - false
 
    是否在多边形周围绘制轮廓(实心填充)。 注意对于复杂多边形,外部多边形以及外部多边形将绘制任何洞。
    Type:
- Boolean
 
visible :Boolean
- Default Value:
 - true
 
    可见性
    Type:
- Boolean
 
wireframe :Boolean
- Default Value:
 - false
 
    是否生成六边形的线框。 轮廓将具有关闭顶部和底部多边形的“水平”线以及多边形上每个顶点的垂直线(“支柱”)。备注:这些线条用GL.LINE渲染,因此总是1像素宽。线框和实体挤出是独占的,如果您想要组合渲染效果,则需要使用相同的数据创建两个图层。这仅在挤出的prop设置为true时有效。
    Type:
- Boolean
 
Methods
addTo(deckgl)
    关联DeckGL
    Parameters:
| Name | Type | Description | 
|---|---|---|
deckgl | 
            
            GeoGlobe.Visuals.DeckGL | 
getElevation(data) → {Int}
- Default Value:
 - data.properties.elevation
 
    高程GET属性
    Parameters:
| Name | Type | Description | 
|---|---|---|
data | 
            
            Feature | geojson中的一个Feature | 
Returns:
    elevation
- Type
 - Int
 
getFillColor(data) → {Array}
- Default Value:
 - data.properties.fillColor
 
    填充颜色GET属性
    Parameters:
| Name | Type | Description | 
|---|---|---|
data | 
            
            Feature | geojson中的一个Feature | 
Returns:
    [0, 0, 0, 255]
- Type
 - Array
 
getInnerLayer() → {Object}
    获取deckgl内部layer实例
Returns:
    layer
- Type
 - Object
 
getLineColor(data) → {Array}
- Default Value:
 - data.properties.lineColor
 
    线颜色GET属性
    Parameters:
| Name | Type | Description | 
|---|---|---|
data | 
            
            Feature | geojson中的一个Feature | 
Returns:
    [0, 0, 0, 255]
- Type
 - Array
 
getLineWidth(data) → {Int}
- Default Value:
 - data.properties.lineWidth
 
    线宽度GET属性
    Parameters:
| Name | Type | Description | 
|---|---|---|
data | 
            
            Feature | geojson中的一个Feature | 
Returns:
    lineWidth
- Type
 - Int
 
getPolygon(data) → {Array}
- Default Value:
 - ata.geometry.coordinates
 
    多边形GET属性
    Parameters:
| Name | Type | Description | 
|---|---|---|
data | 
            
            Feature | geojson中的一个Feature | 
Returns:
    Polygon
- Type
 - Array
 
remove()
    从父对象中移除自己
        
            
    
    render()
    绘制