GeoLonLatGridLayer

经纬网图层

new Cesium.GeoLonLatGridLayer(options)

Name Type Description
options Object optional 参数选项:
Name Type Default Description
lineColor Color Cesium.Color.WHITE optional 经纬线显示的颜色
lineWidth Number 1.0 optional 经纬线宽度
labelColor Color Cesium.Color.WHITE optional 标注显示的颜色
labelFont String '32px sans-serif' optional 标注字体类型
Author:
  • zhoue
Example:
let geoLonLatGridLayer = new Cesium.GeoLonLatGridLayer({
	   lineColor: Cesium.Color.RED,
	   lineWidth: 1.5,
	   labelColor: Cesium.Color.RED,
	   labelFont: '30px sans-serif'
});
	geoLonLatGridLayer.addTo(viewer);
Demo:

Extends

Methods

addTo(map)

绑定到三维地图
Name Type Description
map viewer
Inherited From:

destroy()

销毁图层对象

getData()

获取图层数据
Inherited From:

getDataSource()

获取数据源
Inherited From:

hide()

隐藏图层

pickFeatures(pickedFeatures, windowPosition, geographicPosition, eventType)Object

拾取图层中的要素
Name Type Description
pickedFeatures Array 场景中被拾取的对象集合,需要在图层自己内部判断识别出属于自己的,并挂接上图层的属性信息
windowPosition Cartesian2 画布的二维坐标
geographicPosition Object 地理位置,{ lng: lng, lat: lat, height: height }
eventType ScreenSpaceEventType 事件类型
Returns:
返回固定形态的结构数据
Inherited From:
Example:
//返回结构参考样例
{
			houseCode: fwCode,
			floorCode: floor,
			eventType: ScreenSpaceEventType.LEFT_CLICK,
			originalLayer: geoSingleBuildingLayer
			param:{
				info: pickedFeature,
				pickedInfos: pickedFeatureList
			}
		}

remove()

将图层从视图中移除

removeDataSource()

移除数据源
Inherited From:

render()

渲染图层

setData(data)

设置图层数据
Name Type Description
data Object
Inherited From:

setDataSource(dataSource)

设置数据源
Name Type Description
dataSource GeoDataSource
Inherited From:

show()

显示图层