Namespace: ExportShape

ExportShape

导出Shape格式数据

Example

var geojson = {
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [125.6, 10.1]
  },
  "properties": {
    "name": "Dinagat Islands"
  }
};

function good_func() {
  alert("Export success!");
}

function error_func() {
  alert("Export error!");
}

KQCommon.ExportShape.getInstance().exportShapeAsync({
  geojson: geojson,
  url: "http://172.16.0.6:8699/KQGis/rest/services",
  good_func: good_func,
  error_func: error_func,
});

Methods

KQCommon.ExportShape.exportShapeAsync(options){null}

common/core/ExportShape.js, line 60

将geojson导出为shape文件

Name Type Description
options Object

转换geojson到shapefile的可选参数

Name Type Description
geojson string

geojson object

url string

kqservice的url

good_func Object 可选

转换成功后的回调函数

error_func string 可选

转换失败后的回调函数

Returns:
Type Description
null

KQCommon.ExportShape.getInstance(){ExportShape}

common/core/ExportShape.js, line 48

取得单例对象

Returns:
Type Description
ExportShape 实例对象

KQCommon.ExportShape.isLastError(){Boolean}

common/core/ExportShape.js, line 137

是否发生了错误

Returns:
Type Description
Boolean