导出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 options
Object 转换geojson到shapefile的可选参数
Name Type Description geojson
GeoJSONObject geojson object
url
string kqservice的url
onsuccess
Object 可选 转换成功后的回调函数
onfailed
string 可选 转换失败后的回调函数
Returns:
Type Description null -
KQCommon.ExportShape.exportShapeAsync(options){null}
leaflet/bigdata/geometry/DownShapeFromGeoJSON.js, line 74 -
将geojson导出为shape文件
Name Type Description options
Object 转换geojson到shapefile的可选参数
Name Type Description geojson
GeoJSONObject geojson object
url
string bigdata接口的url
epsgSource
string 可选 源坐标系
epsgTarget
string 可选 转换目标坐标系
fileType
string 可选 下载文件类型(geojson、shp、txt),默认geojson
filename
string 导出文件名称
geojson
string 可选 geojson格式串(面)
geomList
Array.<string> 可选 wkt格式数组
onsuccess
Object 可选 转换成功后的回调函数
onfailed
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