导出Shape格式数据
Example
var geojson = {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [125.6, 10.1]
},
"properties": {
"name": "Dinagat Islands"
}
};
function onsuccess() {
alert("Export success!");
}
function onfailed() {
alert("Export error!");
}
KQCommon.ExportShape.getInstance().exportShapeAsync({
geojson: geojson,
url: "http://172.16.0.6:8699/KQGis/rest/services",
onsuccess: onsuccess,
onfailed: onfailed,
});
Methods
-
KQCommon.ExportShape.exportShapeAsync(options){null}
common/core/ExportShape.js, line 60 -
将geojson导出为shape文件
Name Type Description optionsObject 转换geojson到shapefile的可选参数
Name Type Description geojsonGeoJSONObject geojson object
urlstring kqservice的url
onsuccessObject 可选 转换成功后的回调函数
onfailedstring 可选 转换失败后的回调函数
Returns:
Type Description null -
KQCommon.ExportShape.exportShapeAsync(options){null}
leaflet/bigdata/geometry/DownShapeFromGeoJSON.js, line 74 -
将geojson导出为shape文件
Name Type Description optionsObject 转换geojson到shapefile的可选参数
Name Type Description geojsonGeoJSONObject geojson object
urlstring bigdata接口的url
epsgSourcestring 可选 源坐标系
epsgTargetstring 可选 转换目标坐标系
fileTypestring 可选 下载文件类型(geojson、shp、txt),默认geojson
filenamestring 导出文件名称
geojsonstring 可选 geojson格式串(面)
geomListArray.<string> 可选 wkt格式数组
onsuccessObject 可选 转换成功后的回调函数
onfailedstring 可选 转换失败后的回调函数
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