Methods
(async, static) append(layer) → {Promise.<*>}
添加图层
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
MapLayer | 图层 |
Returns:
- Type
- Promise.<*>
(async, static) clearDirty() → {boolean}
清除编辑
Returns:
成功/失败
- Type
- boolean
(async, static) createObj() → {Promise.<Map>}
构造一个新的 Map 对象。
Returns:
- Type
- Promise.<Map>
(async, static) dragIn(index, layer) → {Number}
拽入图层
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 索引(int类型的Number) |
layer |
MapLayer | 图层 |
Returns:
(int类型的Number)成功返回1,失败返回0
- Type
- Number
(async, static) dragOut(layer)
移除图层,不会销毁图层
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
MapLayer | 图层 |
Returns:
成功返回1,失败返回0
(async, static) fromXML(strXMl, onlyStyle) → {int}
从字符串中输入
Parameters:
| Name | Type | Description |
|---|---|---|
strXMl |
String | |
onlyStyle |
boolean | 支持仅导出样式 |
Returns:
- Type
- int
(async, static) getDescription() → {Promise.<String>}
获取地图描述
Returns:
- Type
- Promise.<String>
(async, static) getEntireRange() → {Promise.<Rect>}
获取地图范围
Returns:
- Type
- Promise.<Rect>
(async, static) getFixedScale(index) → {double}
获取固定的显示比
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | 显示比的索引 |
Returns:
- Type
- double
(async, static) getFixedScalesCount() → {int}
获取固定的显示比个数
Returns:
- Type
- int
(async, static) getIsCustomEntireRange() → {boolean}
获取是否适应整个地图范围
Returns:
- Type
- boolean
(async, static) getIsDirty()
获取是否编辑
Returns:
是否编辑
(async, static) getIsFixedScalesDisplay() → {boolean}
获取是否固定显示比的显示
Returns:
- Type
- boolean
(async, static) getLayer(index) → {Promise.<MapLayer>}
获取图层的名称
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 图层索引(int类型的Number) |
Returns:
- Type
- Promise.<MapLayer>
(async, static) getLayerCount()
获取地图节点图层数目
Returns:
返回节点图层数
(async, static) getLayerEnum() → {Promise.<LayerEnum>}
获取地图所有图层
Returns:
返回所有图层对象
- Type
- Promise.<LayerEnum>
(async, static) getMaxScale() → {Promise.<double>}
获取最大显示比
Returns:
- Type
- Promise.<double>
(async, static) getMinScale() → {Promise.<double>}
获取最小显示比
Returns:
- Type
- Promise.<double>
(async, static) getName() → {Promise.<String>}
获取地图名称
Returns:
- Type
- Promise.<String>
(async, static) getRange() → {Rect}
获取范围
Returns:
地图范围
- Type
- Rect
(async, static) GetRotateAngle() → {double}
获取地图旋转角
Returns:
- Type
- double
(async, static) GetRotateCenter() → {Promise.<Dot>}
获取地图旋转中心
Returns:
- Type
- Promise.<Dot>
(async, static) getSRSInfo() → {Promise.<SRefData>}
获取空间参照系
Returns:
空间参照系
- Type
- Promise.<SRefData>
(async, static) getSymbolScale() → {double}
获取符号等级
Returns:
- Type
- double
(async, static) getViewRange() → {Promise.<Rect>}
获取显示范围
Returns:
显示范围
- Type
- Promise.<Rect>
(async, static) indexOfByLayer(layer)
根据图层查找索引
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
MapLayer | 图层 |
Returns:
成功返回索引,失败返回-1
(async, static) indexOfByName(name)
根据名称查找图层
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String | 图层名称 |
Returns:
成功返回索引,失败返回-1
(async, static) insert(index, layer) → {Number}
插入图层(成功返回1,失败返回0)
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 索引 |
layer |
MapLayer | 图层 |
Returns:
- Type
- Number
(async, static) move(fromIndex, toIndex)
将图层从fromIndex移至toIndex
Parameters:
| Name | Type | Description |
|---|---|---|
fromIndex |
Number | 移动前图层索引(int范围的Number) |
toIndex |
Number | 移动后图层索引 (int范围的Number) |
Returns:
成功返回true,失败返回false
(async, static) moveToBottom(index) → {boolean}
移动图层到最下面(最后绘制)
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 图层索引(int类型的Number) |
Returns:
成功返回true,失败返回false
- Type
- boolean
(async, static) moveToDown(index) → {boolean}
下移图层
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 图层索引(int类型的Number) |
Returns:
成功返回true,失败返回false
- Type
- boolean
(async, static) moveToTop(index) → {boolean}
移动图层到最上面(最先绘制)
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 图层索引 (int类型的Number) |
Returns:
成功返回true,失败返回false
- Type
- boolean
(async, static) moveToUp(index) → {boolean}
上移图层
Parameters:
| Name | Type | Description |
|---|---|---|
index |
int | 图层索引(int类型的Number) |
Returns:
成功返回true,失败返回false
- Type
- boolean
(async, static) outputToBitmap(dispRange, bitmap) → {int}
根据指定的地图范围生成一张指定大小的图片
Parameters:
| Name | Type | Description |
|---|---|---|
dispRange |
Rect | 地图范围 |
bitmap |
Image | 生成的图片,用户负责构造指定大小的图片,要求像素格式为ARGB_8888 |
Returns:
- Type
- int
(async, static) remove(fromIndex, count) → {boolean}
从FromIndex开始移除Count个图层
Parameters:
| Name | Type | Description |
|---|---|---|
fromIndex |
Number | 开始索引(int范围的Number) |
count |
Number | 移除个数(int范围的Number) |
Returns:
成功返回true,失败返回false
- Type
- boolean
(async, static) removeAll() → {boolean}
移除所有图层,同时销毁图层
Returns:
成功返回true,失败返回false
- Type
- boolean
(async, static) removeByIndex(index) → {boolean}
移除索引为index的图层
Parameters:
| Name | Type | Description |
|---|---|---|
index |
Number | 图层索引(int范围的Number) |
Returns:
成功返回true,失败返回false
- Type
- boolean
(async, static) removeByLayer(layer) → {boolean}
移除图层
Parameters:
| Name | Type | Description |
|---|---|---|
layer |
MapLayer | 图层 |
Returns:
- Type
- boolean
(async, static) setDescription(Description) → {Promise.<void>}
设置地图描述信息
Parameters:
| Name | Type | Description |
|---|---|---|
Description |
String |
Returns:
- Type
- Promise.<void>
(async, static) setEntireRange(EntireRange) → {Promise.<void>}
设置地图范围
Parameters:
| Name | Type | Description |
|---|---|---|
EntireRange |
Rect |
Returns:
- Type
- Promise.<void>
(async, static) setFixedScale(scale) → {Promise.<void>}
设置修订后的显示比
Parameters:
| Name | Type | Description |
|---|---|---|
scale |
Number |
Returns:
- Type
- Promise.<void>
(async, static) setFixedScalesCount(FixedScalesCount) → {Promise.<void>}
设置修订显示比数目
Parameters:
| Name | Type | Description |
|---|---|---|
FixedScalesCount |
Number |
Returns:
- Type
- Promise.<void>
(async, static) setIsCustomEntireRange(IsCustomEntireRange) → {Promise.<void>}
设置地图范围
Parameters:
| Name | Type | Description |
|---|---|---|
IsCustomEntireRange |
boolean |
Returns:
- Type
- Promise.<void>
(async, static) setIsFixedScalesDisplay(IsFixedScalesDisplay)
设置固定显示比的显示
Parameters:
| Name | Type | Description |
|---|---|---|
IsFixedScalesDisplay |
boolean | 是否显示显示比 |
(async, static) setMaxScale(MaxScale) → {Promise.<void>}
设置地图最小大显示比
Parameters:
| Name | Type | Description |
|---|---|---|
MaxScale |
Number |
Returns:
- Type
- Promise.<void>
(async, static) setMinScale(MinScale) → {Promise.<void>}
设置地图最小显示比
Parameters:
| Name | Type | Description |
|---|---|---|
MinScale |
number |
Returns:
- Type
- Promise.<void>
(async, static) setName(name) → {Promise.<void>}
设置地图名称
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String |
Returns:
- Type
- Promise.<void>
(async, static) SetRotateAngle(angle) → {Promise.<void>}
设置地图旋转角
Parameters:
| Name | Type | Description |
|---|---|---|
angle |
Number | 旋转角度 (doublef范围的Number) |
Returns:
- Type
- Promise.<void>
(async, static) SetRotateCenter(center) → {Promise.<void>}
设置地图旋转中心
Parameters:
| Name | Type | Description |
|---|---|---|
center |
Dot | 旋转中心 |
Returns:
- Type
- Promise.<void>
(async, static) setViewRange(rect) → {Promise.<Void>}
设置显示范围
Parameters:
| Name | Type | Description |
|---|---|---|
rect |
Rect | 显示范围 |
Returns:
- Type
- Promise.<Void>
(async, static) toXML(onlyStyle) → {String}
输出到字符串中
Parameters:
| Name | Type | Description |
|---|---|---|
onlyStyle |
boolean | 支持仅导出样式 |
Returns:
成功返回Cstring值
- Type
- String