new MapLayer()
- Source:
Methods
(async, static) attachData(cls) → {boolean}
附加外部数据
Parameters:
| Name | Type | Description |
|---|---|---|
cls |
Object | 地理类对象 |
- Source:
Returns:
true/false 成功/失败
- Type
- boolean
(async, static) clone() → {Promise.<MapLayer>}
复制图层
- Source:
Returns:
} 成功返回克隆之后的图层
- Type
- Promise.<MapLayer>
(async, static) createObj() → {Promise.<MapLayer>}
构造一个新的 MapLayer 对象。
- Source:
Returns:
- Type
- Promise.<MapLayer>
(async, static) detachData() → {boolean}
附加解除
- Source:
Returns:
true/false 成功/失败
- Type
- boolean
(async, static) fromXML(strXML, onlyStyle) → {int}
从XML导入
Parameters:
| Name | Type | Description |
|---|---|---|
strXML |
||
onlyStyle |
true:仅导入样式信息 false:除图层样式信息外还包括图层的name、geometryType、url、layerWeight、state信息 |
- Source:
Returns:
1-成功;0-失败
- Type
- int
(async, static) getClsType() → {Number}
获取类类型
- Source:
Returns:
类类型(int类型的数值;例如 30 -- XClsType.SFCls)
- Type
- Number
(async, static) getData() → {Promise.<IBasCls>}
获取图层要素数据类
- Source:
Returns:
成功获得数据类
- Type
- Promise.<IBasCls>
(async, static) GetGeometryType() → {Number}
获取要素几何类型
- Source:
Returns:
要素几何类型(int类型的数值;例如 1--GeomType.GeomPnt
- Type
- Number
(async, static) getIsValid() → {Promise.<*>}
查看图层是否有效
- Source:
Returns:
- Type
- Promise.<*>
(async, static) getIsVisible()
获取图层是否显示
- Source:
(async, static) getLabel() → {Promise.<Label>}
获取当前的标注
- Source:
Returns:
} 成功返回当前的标注
- Type
- Promise.<Label>
(async, static) getMaxScale()
获取图层最大显示比率
- Source:
(async, static) getMinScale()
获取图层最小显示比率
- Source:
(async, static) getName() → {Promise.<*>}
获取图层名称
- Source:
Returns:
- Type
- Promise.<*>
(async, static) getRange() → {Promise.<Rect>}
获取地图范围
- Source:
Returns:
- Type
- Promise.<Rect>
(async, static) getSrefInfo() → {Promise.<SRefData>}
获取空间参照系
- Source:
Returns:
- Type
- Promise.<SRefData>
(async, static) getState() → {Promise.<(*|NavigationPreloadState)>}
获取图层状态
- Source:
Returns:
- Type
- Promise.<(*|NavigationPreloadState)>
(async, static) getThemes() → {Promise.<Themes>}
获获取专题图列表
- Source:
Returns:
} 成功返回专题图列表
- Type
- Promise.<Themes>
(async, static) getURL() → {Promise.<*>}
获取图层的URL
- Source:
Returns:
- Type
- Promise.<*>
(async, static) getWeight() → {Promise.<*>}
获取图层的权重
- Source:
Returns:
- Type
- Promise.<*>
(async, static) setMaxScale(MaxScale)
设置图层最大显示比率
Parameters:
| Name | Type | Description |
|---|---|---|
MaxScale |
图层最大显示比率 |
- Source:
(async, static) setMinScale(MinScale)
设置图层最小显示比率
Parameters:
| Name | Type | Description |
|---|---|---|
MinScale |
图层最小显示比率 |
- Source:
(async, static) setName(Name) → {Promise.<*>}
获取图层名称
Parameters:
| Name | Type | Description |
|---|---|---|
Name |
String | 图层名称 |
- Source:
Returns:
- Type
- Promise.<*>
(async, static) setState(State)
设置图层状态
Parameters:
| Name | Type | Description |
|---|---|---|
State |
Boolean | 图层状态 |
- Source:
(async, static) setURL(URL) → {Promise.<void>}
设置图层URL地址
Parameters:
| Name | Type | Description |
|---|---|---|
URL |
String | 图层URL地址 |
- Source:
Returns:
- Type
- Promise.<void>
(async, static) setVisible(visible)
设置图层是否显示
Parameters:
| Name | Type | Description |
|---|---|---|
visible |
Boolean | 图层是否显示 |
- Source:
(async, static) setWeight(Weight)
设置图层的权重
Parameters:
| Name | Type | Description |
|---|---|---|
Weight |
String | 权重 |
- Source:
(async, static) toXML(onlyStyle) → {String}
存为XML
Parameters:
| Name | Type | Description |
|---|---|---|
onlyStyle |
boolean | true:仅导出样式 false:除图层样式信息外还包括图层的name、geometryType、url、layerWeight、state信息 |
- Source:
Returns:
xml
- Type
- String