Class: Maps

Maps()

new Maps()

地图列表类
Source:

Methods

(async, static) append(map) → {int}

添加地图
Parameters:
Name Type Description
map Object 地图对象
Source:
Returns:
index 添加地图后的索引
Type
int

(async, static) createObj() → {Promise.<Maps>}

构造一个新的 Maps 对象
Source:
Returns:
Type
Promise.<Maps>

(async, static) getCount() → {int}

获取地图数量
Source:
Returns:
地图数量
Type
int

(async, static) getMap(index)

得到指定索引的地图
Parameters:
Name Type Description
index int 地图索引
Source:
Returns:
Map 成功返回地图

(async, static) indexOf(map) → {int}

得到索引
Parameters:
Name Type Description
map Object 地图对象
Source:
Returns:
成功返回地图的索引
Type
int

(async, static) insert(index, map) → {int}

插入地图
Parameters:
Name Type Description
index int 地图索引:
map Object 地图对象
Source:
Returns:
插入后的ID
Type
int

(async, static) remove(index) → {boolean}

移除地图
Parameters:
Name Type Description
index int 地图索引:
Source:
Returns:
成功/失败
Type
boolean

(async, static) removeAll() → {boolean}

移除所有地图
Source:
Returns:
true/false:成功/失败
Type
boolean