Namespace: ImportShape

ImportShape

导入Shape格式数据

Example

function onsuccess(data) {
  alert("Import success:" + JSON.stringify(data));
}

function onfailed() {
  alert("Import error!");
}

var importShape = KQCommon.ImportShape.getInstance();
importShape.importShapeAsync({
  url: 'http://172.16.0.6:8699/KQGis/rest/services',
  onsuccess,
  onfailed
});

Methods

KQCommon.ImportShape.getInstance(){ImportShape}

common/core/ImportShape.js, line 35

取得单例对象

Returns:
Type Description
ImportShape 实例对象

KQCommon.ImportShape.importShapeAsync(options){null}

common/core/ImportShape.js, line 47

导入shape文件

Name Type Description
options Object

导入shape文件的可选参数

Name Type Description
url string

kqservice的url

onsuccess Object 可选

转换成功后的回调函数

onfailed string 可选

转换失败后的回调函数

Returns:
Type Description
null

KQCommon.ImportShape.isLastError(){Boolean}

common/core/ImportShape.js, line 99

是否发生了错误

Returns:
Type Description
Boolean