自定义CustomGeoJsonLayer图层,从geoJson文件中加载矢量数据
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
global |
* | ys.earth |
Methods
-
清空feature
-
销毁
-
getById(id) → PointFeature|LineFeature|PolygonFeature
-
根据id查找feature
Name Type Description id
String feature的id Returns:
-
加载
-
删除feature
Name Type Description feature
PointFeature | LineFeature | PolygonFeature feature -
根据id删除feature
Name Type Description id
String feature的id -
设置feature的样式
Name Type Description feature
PointFeature | LineFeature | PolygonFeature feature style
Object 样式 Name Type Default Description point
Object {}
optional 点样式 Name Type Default Description color
Color new Color(1.0, 1.0, 1.0, 1.0)
optional 点颜色 pixelSize
Number 14
optional 点大小 outlineColor
Color new Color(0.0, 0.0, 0.0, 1.0)
optional 点边框颜色 outlineWidth
Number 1.0
optional 点边框宽度 height
Number 0.0
optional 点高程 heightReference
HeightReference HeightReference.NONE
optional 点高程属性 line
Object {}
optional 线样式 Name Type Default Description color
Color new Color(1.0, 1.0, 1.0, 1.0)
optional 线颜色 width
Number 1.0
optional 线宽度 classificationType
ClassificationType ClassificationType.BOTH
optional 线分类类型 polygon
Object {}
optional 面样式 Name Type Default Description color
Color new Color(1.0, 1.0, 1.0, 1.0)
optional 面颜色 outlineColor
Color new Color(0.0, 0.0, 0.0, 1.0)
optional 面边框颜色 outlineWidth
Number 1.0
optional 面边框宽度 classificationType
ClassificationType ClassificationType.BOTH
optional 面分类类型 -
设置feature显示或者隐藏
Name Type Description feature
PointFeature | LineFeature | PolygonFeature feature visible
Boolean 显示还是隐藏
Events
-
点击事件
Name Type Description feature
PointFeature | LineFeature | PolygonFeature 点击的feature -
数据加载完成事件