# new ResourceServer(options)
资源服务,基地址为http://{ip}:{port}/igs/rest/services/system/ResourceServer
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
Object | 构造参数 |
url |
String | 服务基地址 |
继承关系
成员变量
# enableGlobeFetch
是否使用确据唯一的fetch对象,默认为true,当设为false时,会使用自己私有的fetch对象,所有的请求设置不会影响全局
- Inherited From:
示例
//设置请求基地址
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//请求基地址
url: '你的URL',
//使用私有的fetch对象
enableGlobeFetch: false,
//此时设置token等属性,不会影响全局的fetch对象
tokenValue: '你的token'
});
//继续使用全局fetch
BaseServer.enableGlobeFetch = true;
# headers
请求头参数
- Inherited From:
示例
//设置请求头参数
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//请求头
headers: {
//设置Content-Type为multipart/form-data
'Content-Type': 'multipart/form-data',
//设置token
'token': '你的token'
}
});
//动态修改
BaseServer.headers.token = '新token';
# requestInterceptor
请求发送拦截器
- Inherited From:
示例
//设置拦截器,任何一个继承自BaseServer的对象都可以设置,全局唯一
// ES5引入方式
const { BaseServer,RequestInterceptor } = zondy.service
// ES6引入方式
import { BaseServer,RequestInterceptor } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//设置请求发送拦截器
requestInterceptor: new RequestInterceptor({
//请求发送前进行统一处理
before: function(config) {
//执行你的业务逻辑
//注意必须显示返回config对象,如果返回为空,则不发送请求
return config;
},
//请求发送失败时进行统一处理
failure: function(error) {
//执行你的业务逻辑
}
})
});
//动态修改
BaseServer.requestInterceptor.before = function() {};
# requestTimeout
请求超时时间,默认45000ms,即45s
- Inherited From:
示例
//设置超时时间
//初始化AddressServer服务对象
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//超时时间
requestTimeout: 2000
});
//动态修改
BaseServer.requestTimeout = 3000;
# responseInterceptor
请求响应拦截器
- Inherited From:
示例
//设置拦截器,任何一个继承自BaseServer的对象都可以设置,全局唯一
// ES5引入方式
const { BaseServer,ResponseInterceptor } = zondy.service
// ES6引入方式
import { BaseServer,ResponseInterceptor } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//设置请求响应拦截器
responseInterceptor: new ResponseInterceptor({
//执行请求响应,接口调用成功时会执行的回调
success: function(result) {
//执行你的业务逻辑
//注意必须显示返回result对象,如果返回为空,则不执行请求响应成功回调
return result;
},
//请求响应成功,接口调用失败时会执行的函数
failure: function(result) {
//执行你的业务逻辑
//注意必须显示返回result对象,如果返回为空,则不执行回调韩式
return result;
}
})
});
//动态修改
BaseServer.responseInterceptor.success = function() {};
# tokenAttachType
指定token附加到何处
- Inherited From:
示例
//设置token值
// ES5引入方式
const { BaseServer } = zondy.service
const { TokenAttachType } = zondy.enum
// ES6引入方式
import { BaseServer,TokenAttachType } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//token名
tokenValue: '你的token值',
//token值
tokenValue: '你的token值',
//指定token附加到url后面
tokenAttachType: TokenAttachType.url
});
//动态修改
BaseServer.tokenAttachType = TokenAttachType.header;
# tokenKey
token名
- Inherited From:
示例
//设置token名
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//token名
tokenKey: '你的tokenKey'
});
//动态修改
BaseServer.tokenKey = '新tokenKey';
# tokenValue
token值
- Inherited From:
示例
//设置token值
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//token值
tokenValue: '你的token值'
});
//动态修改
BaseServer.tokenValue = '新token值';
# url
服务基地址
- Inherited From:
示例
//设置请求基地址
// ES5引入方式
const { BaseServer } = zondy.service
// ES6引入方式
import { BaseServer } from "@mapgis/webclient-common"
let BaseServer = new BaseServer({
//请求基地址
url: '你的URL'
});
//动态修改
BaseServer.url = '新URL';
方法
# addClass(options)
在数据库中创建一个类
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
datasource |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
userName |
String | 数据源用户名 |
layerName |
String | 图层名称,必传 |
geomType |
String | 几何类型,必传,igs2.0支持"Pnt" "Lin" "Reg" "Ann" "Surface" "Entity" "Unknown" |
srs |
String | 参考系信息,支持mapgis参照系名称和EPSG编号,比如EPSG:4326、WGS1984_度 |
fdsName |
String | 要素集名称 |
fields |
Array.<Object> | 属性字段结构信息,必传,示例:[{"name": "string","type": "string","alias": "string","length": 0}] |
featureType |
String | 要素类型,取值为sfcls 或 acls,默认sfcls,目前仅支持简单要素类和注记类(只支持文本类型注记) |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const addClass = resourceServer.addClass({
method: FetchMethod.post,
datasource: "MapGISLocalPlus",
gdbName: "test",
useName: "",
layerName: "test_0426_feature",
srs: "WGS1984_度",
geomType: "Reg",
fdsName: "test",
fields: [{ name: "string", type: "string", alias: "string", length: 0 }],
success: function (res) {
console.log("res: ", res);
},
});
# addGDB(options)
新建数据库
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
datasource |
String | 数据库名,必传 |
gdbName |
String | gdb名称 |
userName |
String | 数据源用户名 |
path |
String | gdb路径 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const addGDB = resourceServer.addGDB({
method: FetchMethod.post,
datasource: "MapGISLocalPlus",
gdbName: "test_0426",
path: "e://数据源",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const addGDB = resourceServer.addGDB({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "test_04261",
path: "d:\\",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# addMapLayer(options)
添加图层到文档中指定地图,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 地图文档名称,必传 |
mapIndex |
String | 地图索引,必传 |
updateObject |
Object | 更新参数,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const addMapLayer = resourceServer.addMapLayer({
method: FetchMethod.post,
docName: "sz",
mapIndex: "新地图1",
updateObject:{},
success: function (res) {
console.log("res: ", res);
},
});
# attachGDB(options)
附加数据库
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
userName |
String | 数据源用户名 |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
datasource |
String | 数据源名,必传 |
gdbName |
String | gdb名称,必传 |
path |
String | gdb路径,必传 |
userName |
String | 数据源用户名 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const attachGDB = resourceServer.attachGDB({
method: FetchMethod.post,
datasource: 'MapGISLocalPlus',
gdbName: 'test_0426',
path: 'e://数据源//test_0426.hdb',
useName: '',
success: function (res) {
console.log('res: ', res)
}
})
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const attachGDB = resourceServer.attachGDB({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "test_0426",
path: "e:\\数据源\\test_0426.hdb",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# createGdbLayer(options)
在GDB数据库中创建一个图层,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
gdbSvrName |
String | 数据源名称,必传 |
gdbName |
String | GDB数据名称,必传 |
featureType |
String | 要素类型,必传。FeatureDS(要素数据集)、SfeatureCls(简单要素类)、ObjectCls(对象类)、AnnotationCls(注记类)、RasterDataset(栅格数据集)、RasterCatalog(栅格目录)、GnetCls(几何网络)、AddrBaseCls(地名库)等。 |
layerName |
String | 图层名称,必传 |
geoType |
String | 几何类型,必传。区图层为Reg、线图层为Lin、点图层为Pnt |
srefName |
String | 参考系名称 |
dsName |
String | 要素数据集名称 |
attStruct |
CAttStruct | 图层数据结构 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
const { CAttStruct } = zondy.object
// ES6引入方式
import { ResourceServer ,FetchMethod ,CAttStruct } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const createGdbLayer = resourceServer.createGdbLayer({
method: FetchMethod.post,
gdbSvrName: "MapGISLocalPlus",
gdbName: "sample",
featureType: "SfeatureCls",
layerName: "新图层",
dsName: "地图综合",
geoType: "Reg",
srefName: "WGS1984_度",
attStruct: new CAttStruct({
FldName: ["ID", "面积", "周长", "LayerID"],
FldNumber: 4,
FldType: ["FldLong", "FldDouble", "FldDouble", "FldLong"],
}),
success: function (res) {
console.log("res: ", res);
},
});
# createLayerInGdbp(options)
在GDB数据库中创建一个图层,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
gdbSvrName |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
featureType |
String | 要素类型,必传,要素数据集为FeatureDS、简单要素类为SFeatureCls,对象类为ObjectCls,注记类为AnnotationCls,网络类为GNetCls…..。 |
layerName |
String | 图层名称,必传 |
geoType |
String | 几何类型,必传,区图层为Reg、线图层为Lin、点图层为Pnt |
srefName |
String | 参考系名称 |
dsName |
String | 要素名称 |
attStruct |
CAttStruct | 属性结构 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
const { CAttStruct } = zondy.object
// ES6引入方式
import { ResourceServer ,FetchMethod ,CAttStruct } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const createLayerInGdbp = resourceServer.createLayerInGdbp({
method: FetchMethod.post,
gdbSvrName: "MapGISLocalPlus",
gdbName: "sample",
featureType: "SfeatureCls",
layerName: "新图层",
dsName: "地图综合",
geoType: "Reg",
srefName: "WGS1984_度",
attStruct: new CAttStruct({
FldName: ["ID", "面积", "周长", "LayerID"],
FldNumber: 4,
FldType: ["FldLong", "FldDouble", "FldDouble", "FldLong"],
}),
success: function (res) {
console.log("res: ", res);
},
});
# deleteGDB(options)
删除数据库
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
datasource |
String | 数据源名,必传 |
gdbName |
String | gdb名称,必传 |
userName |
String | 数据源用户名 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const deleteGDB = resourceServer.deleteGDB({
method: FetchMethod.delete,
datasource: "MapGISLocalPlus",
gdbName: "test_0426",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const deleteGDB = resourceServer.deleteGDB({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "test_0426",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# deleteLayerInGdbp(options)
删除GDB数据库中的一个图层,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
gdbSvrName |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
featureType |
String | 要素类型,必传,要素数据集为FeatureDS、简单要素类为SFeatureCls,对象类为ObjectCls,注记类为AnnotationCls,网络类为GNetCls…..。 |
layerName |
String | 图层名称,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const deleteLayerInGdbp = resourceServer.deleteLayerInGdbp({
method: FetchMethod.get,
gdbSvrName: "MapGISLocalPlus",
gdbName: "sample",
featureType: "SfeatureCls",
layerName: "等值线",
success: function (res) {
console.log("res: ", res);
},
});
# deleteSimpleFeature(options)
删除简单要素类
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
datasource |
String | gdb名称,必传 |
gdbName |
String | gdb名称,必传 |
featureSetName |
String | 简单要素类名称,必传 |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
userName |
String | 数据源用户名 |
示例
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const deleteSimpleFeature = resourceServer.deleteSimpleFeature({
method: FetchMethod.delete,
datasource: "MapGISLocalPlus",
gdbName: "sample",
featureSetName: "等值线",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# detachGDB(options)
注销数据库
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
datasource |
String | 数据源名,必传 |
gdbName |
String | gdb名称,必传 |
userName |
String | 数据源用户名 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const detachGDB = resourceServer.detachGDB({
method: FetchMethod.put,
datasource: "MapGISLocalPlus",
gdbName: "test_0426",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const detachGDB = resourceServer.detachGDB({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "test_0426",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# editLayerSystemLib(options)
修改图层的系统库,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
systemLib |
String | 系统库id或名称 |
gdbps |
String | 图层列表,多个用英文逗号隔开 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const editLayerSystemLib = resourceServer.editLayerSystemLib({
method: FetchMethod.get,
systemLib: "0",
gdbps: "gdbp://MapGISLocalPlus/test/ds/test/sfcls/test_0426_feature1",
success: function (res) {
console.log("res: ", res);
},
});
# editMapLayerIndex(options)
修改文档中指定地图下图层的索引,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 地图文档名称,必传 |
mapIndex |
String | 地图索引,必传 |
guid |
String | 用户会话id |
updateObject |
String | 更新参数,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const editMapLayerIndex = resourceServer.editMapLayerIndex({
method: FetchMethod.post,
docName: "sz",
mapIndex: "新地图1",
layerIndexs: "0",
updateObject:{},
success: function (res) {
console.log("res: ", res);
},
});
# editMapLayerSystemLib(options)
修改文档下图层的系统库,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 地图文档名称,必传 |
mapIndex |
String | 地图索引,必传 |
systemLib |
String | 系统库id或名称 |
layerIndexs |
String | 图层索引列表(多个用英文逗号分隔) |
guid |
String | 用户会话id |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const editMapLayerSystemLib = resourceServer.editMapLayerSystemLib({
method: FetchMethod.get,
docName: "sz",
mapIndex: "新地图1",
systemLib: "DefaultSystemLib",
layerIndexs: "0",
success: function (res) {
console.log("res: ", res);
},
});
# editTempDataInfo(options)
修改系统库
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
urls |
String | 图层列表,必传,可能是gdbp、filePath,多个用","分隔 |
systemLibId |
String | 系统库id |
systemLibName |
String | 系统库的名称,systemLibId参数为空时有效 |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
示例
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const editTempDataInfo = resourceServer.editTempDataInfo({
method: FetchMethod.put,
urls: "gdbp://MapGISLocalPlus/sample/sfcls/等值线1",
systemLibName: "DefaultSystemLib",
success: function (res) {
console.log("res: ", res);
},
});
# getColorByIndex(options)
根据颜色号获取RGB值
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
sysLib |
String | 系统库id,必传 |
colorIndex |
String | 颜色号,必传 |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const querySystemColorList = resourceServer.querySystemColorList({
method: FetchMethod.get,
sysLib: "DefaultSystemLib",
page: 1,
pageSize: 20,
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const querySystemColorList = resourceServer.querySystemColorList({
method: FetchMethod.get,
sysLib: "DefaultSystemLib",
page: 1,
pageSize: 20,
success: function (res) {
console.log("res: ", res);
},
});
# getColorIndex(options)
根据RGB值获取颜色号
参数:
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
options |
查询参数 |
||
sysLib |
String | 系统库id,必传 |
|
color |
Color | 颜色值,必传 |
|
headers |
String | 请求头参数 |
|
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
|
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
|
addIfNotExist |
Boolean | false | 如果查找到的颜色不存在,是否新增 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
const { Color } = zondy
// ES6引入方式
import { ResourceServer ,FetchMethod ,Color } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const getColorIndex = resourceServer.getColorIndex({
method: FetchMethod.get,
sysLib: "DefaultSystemLib",
color: new Color(225, 221, 20, 1),
addIfNotExist: false,
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
const { Color } = zondy
// ES6引入方式
import { ResourceServer ,FetchMethod ,Color } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const getColorIndex = resourceServer.getColorIndex({
method: FetchMethod.get,
sysLib: "DefaultSystemLib",
color: new Color(225, 221, 20, 1),
addIfNotExist: false,
success: function (res) {
console.log("res: ", res);
},
});
# getSimpleFeature(options)
获取简单要素类
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
datasource |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
featureSetName |
String | 简单要素类名称,必传 |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
userName |
String | 数据源用户名 |
示例
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const getSimpleFeature = resourceServer.getSimpleFeature({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
featureSetName: "等值线1",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# operaGdbp(options)
GDB操作接口,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
operType |
String | 操作类型,必传(分为:attach、create、delete、detach) |
gdbName |
String | GDB数据名称,必传 |
gdbServerName |
String | GDB数据源名称 |
useName |
String | 用户名 |
password |
String | 密码,igs1.0有效 |
path |
String | hdf路径或67文件夹路径 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const operaGdbp = resourceServer.operaGdbp({
method: FetchMethod.get,
gdbServerName: "MapGISLocalPlus",
gdbName: "test",
dsName: "test",
operType: "detach",
success: function (res) {
console.log("res: ", res);
},
});
# queryDataSourceFeatureClassList(options)
获取数据集下的要素类列表,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
gdbServerName |
String | GDB数据源名称,必传 |
gdbName |
String | GDB数据名称,必传 |
dsName |
String | 要素数据集名称,必传 |
useName |
String | 用户名 |
password |
String | 密码,igs1.0有效 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryDataSourceFeatureClassList =
resourceServer.queryDataSourceFeatureClassList({
method: FetchMethod.get,
gdbServerName: "MapGISLocalPlus",
gdbName: "test",
dsName: "test",
success: function (res) {
console.log("res: ", res);
},
});
# queryDataSourceInfo(options)
查询数据源信息
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
datasource |
String | 数据库名,必传 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
// ES6引入方式
import { ResourceServer } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const dataSourceInfo = resourceServer.queryDataSourceInfo({
datasource: "MapGISLocalPlus",
success: function (res) {
console.log("res: ", res);
},
});
# queryDataSourceList(options)
获取数据源列表,支持igs1.0和igs2.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
// ES6引入方式
import { ResourceServer } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const dataSourceList = resourceServer.queryDataSourceList({
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
// ES6引入方式
import { ResourceServer } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const dataSourceList = resourceServer.queryDataSourceList({
success: function (res) {
console.log("res: ", res);
},
});
# queryDsAllData(options)
获取GDB下某类型的所有数据,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
gdbSvrName |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
clsType |
String | 要素数据类型,必传。数据类型(分为:ds、rcat、ras、sfcls、fcls、acls、ocls、rds、rcs、ncls、sfcls_new)或者为srefID 参考系id |
useName |
String | 用户名 |
password |
String | 密码,igs1.0有效 |
dsName |
String | 要素数据集名称,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod} from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryDsAllData = resourceServer.queryDsAllData({
method: FetchMethod.get,
gdbSvrName: "MapGISLocalPlus",
gdbName: "sample",
clsType: "sfcls",
dsName: "地图综合",
success: function (res) {
console.log("res: ", res);
},
});
# queryFeatureDataSourceList(options)
查询要素数据集列表
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
datasource |
String | 数据源名,必传 |
gdbName |
String | gdb名称,必传 |
userName |
String | 数据源用户名 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const queryFeatureDataSourceList =
resourceServer.queryFeatureDataSourceList({
method: FetchMethod.get,
datasource: 'MapGISLocalPlus',
gdbName: 'sample',
useName: '',
success: function (res) {
console.log('res: ', res)
}
})
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryFeatureDataSourceList =
resourceServer.queryFeatureDataSourceList({
method: FetchMethod.get,
datasource: 'MapGISLocalPlus',
gdbName: 'sample',
useName: '',
success: function (res) {
console.log('res: ', res)
}
})
# queryGDBList(options)
查询GDB列表
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
datasource |
String | 数据源名,必传 |
userName |
String | 数据源用户名 |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
// ES6引入方式
import { ResourceServer } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const queryGDBList = resourceServer.queryGDBList({
datasource: 'MapGISLocalPlus',
success: function (res) {
console.log('res: ', res)
}
})
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
// ES6引入方式
import { ResourceServer } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const dataSourceInfo = resourceServer.queryDataSourceInfo({
datasource: "MapGISLocalPlus",
success: function (res) {
console.log("res: ", res);
},
});
# queryGdbpAllData(options)
获取GDB下某类型的所有数据,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
gdbSvrName |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
clsType |
String | 要素数据类型,必传。数据类型(分为:ds、rcat、ras、sfcls、fcls、acls、ocls、rds、rcs、ncls、sfcls_new)或者为srefID 参考系id |
useName |
String | 用户名 |
password |
String | 密码,igs1.0有效 |
containAll |
Boolean | 是否返回hdf下所有的对应数据,false表示只返回对应节点下的数据,默认值为true |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryGdbpAllData = resourceServer.queryGdbpAllData({
method: FetchMethod.get,
gdbSvrName: "MapGISLocalPlus",
gdbName: "sample",
clsType: "sfcls",
success: function (res) {
console.log("res: ", res);
},
});
# queryGDBPInfo(options)
获取GDB下某个图层的详细信息,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
gdbpUrl |
String | gdbp地址 |
proj |
String | 对shp图层支持投影,获取到投影后的范围,传参考系名称 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryGDBPInfo = resourceServer.queryGDBPInfo({
method: FetchMethod.get,
gdbpUrl:
"gdbp://MapGISLocalPlus/test/sfcls/metro.json_Lin,gdbp://MapGISLocalPlus/test/sfcls/中国地级县x",
proj: "WGS1984_度",
success: function (res) {
console.log("res: ", res);
},
});
# queryLegendInfo(options)
获取地图文档服务的图例信息,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 服务名 |
layerIndex |
String | 生成图例的图层索引号(多个用英文逗号分隔) |
size |
String | 格式:width,height |
guid |
String | 用户会话id |
maxCount |
String | 返回图例项最大数量 |
page |
String | 页码 |
pageSize |
String | 分页大小 |
where |
String | 过滤条件 |
range |
String | 范围 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer ,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryLegendInfo = resourceServer.queryLegendInfo({
method: FetchMethod.get,
docName: "地图文档_1",
success: function (res) {
console.log("res: ", res);
},
});
# queryMapDocList(options)
获取发布的文档列表,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
version |
String | 版本信息,默认为'1.0',可缺省(缺省时只返回直接发布的文档列表,如果v=2列表中将会包含目录形式发布的文档 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryMapDocList = resourceServer.queryMapDocList({
method: FetchMethod.get,
success: function (res) {
console.log("res: ", res);
},
});
# queryMapInfo(options)
获取文档详细信息,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 文档名称,必传 |
tree |
Boolean | 是否按树形显示,缺省false |
include |
Object | 返回中要求包含的属性 {"IncludeDetails":true,"IncludeSubs":true} |
returnFullStyle |
String | 是否返回全部信息的标志位e |
guid |
String | 用户会话id,可以缺省 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryMapInfo = resourceServer.queryMapInfo({
method: FetchMethod.get,
docName: "sz",
success: function (res) {
console.log("res: ", res);
},
});
# queryMapInfoByIndex(options)
获取指定地图的详细信息,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 地图文档名称,必传 |
mapIndex |
String | 地图索引,必传 |
include |
Object | 返回中要求包含的属性 {"IncludeDetails":true,"IncludeSubs":true} |
returnFullStyle |
String | 是否返回全部信息的标志位e |
guid |
String | 用户会话id,可以缺省 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryMapInfoByIndex = resourceServer.queryMapInfoByIndex({
method: FetchMethod.get,
docName: "sz",
mapIndex: "0",
success: function (res) {
console.log("res: ", res);
},
});
# queryMapLayerInfo(options)
获取指定地图下所有图层的信息,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 地图文档名称,必传 |
mapIndex |
String | 地图索引,必传 |
guid |
String | 用户会话id,可以缺省 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryMapLayerInfo = resourceServer.queryMapLayerInfo({
method: FetchMethod.get,
docName: "sz",
mapIndex: "0",
success: function (res) {
console.log("res: ", res);
},
});
# queryMapLayerInfoByIndex(options)
获取指定地图下指定图层的信息,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 地图文档名称,必传 |
mapIndex |
String | 地图索引,必传 |
layerId |
String | 图层索引,必传 |
guid |
String | 用户会话id,可以缺省 |
returnFullStyle |
String | 是否返回全部信息的标志位e |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryMapLayerInfoByIndex = resourceServer.queryMapLayerInfoByIndex({
method: FetchMethod.get,
docName: "sz",
mapIndex: "0",
layerIndex: "0",
success: function (res) {
console.log("res: ", res);
},
});
# queryServerInfo(options)
获取服务信息,IGS2.0新增服务
参数:
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
options |
查询参数 |
||
success |
function | 无 | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 无 | 查询失败回调函数,若使用Promise方式则不必填写 |
- Inherited From:
示例
获取服务信息-回调方式
server.queryServerInfo({
success: function (result) {
console.log('请求成功:', result);
},
failure: function (result) {
console.log('请求失败:', result);
}
});
获取服务信息-promise方式
server.queryServerInfo({
})
.then(function (result) {
console.log('请求成功:', result);
}).catch(function (result) {
console.log('请求失败:', result);
});
# querySimpleFeatureList(options)
简单要素类列表
参数:
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
options |
查询参数 |
||
headers |
String | 请求头参数 |
|
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
|
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
|
datasource |
String | 数据源名,必传 |
|
gdbName |
String | gdb名称,必传 |
|
userName |
String | 数据源用户名 |
|
fdsName |
String | 要素数据集名称,如果不为空,则仅获取指定要素数据下的数据 |
|
includeAll |
Boolean | false | 是否包含要素数据集下及非要素数据集下的简单要素类数据,仅当fdsName为空时有效 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new .ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const querySimpleFeatureList = resourceServer.querySimpleFeatureList({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
useName: "",
fdsName: "影像数据",
includeAll: true,
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const querySimpleFeatureList = resourceServer.querySimpleFeatureList({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
useName: "",
fdsName: "影像数据",
includeAll: true,
success: function (res) {
console.log("res: ", res);
},
});
# querySrsInfo(options)
查询参考系信息
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
datasource |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
srsName |
String | 参考系名称,必传,在使用igs1.0服务时,需要传入参考系id |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
userName |
String | 数据源用户名 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const querySrsInfo = resourceServer.querySrsInfo({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
srsName: "WGS1984_度",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const querySrsInfo = resourceServer.querySrsInfo({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
srsName: "7",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# querySrsList(options)
查询参考系列表
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
datasource |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
userName |
String | 数据源用户名 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const querySrsList = resourceServer.querySrsList({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const querySrsList = resourceServer.querySrsList({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# querySymbol(options)
修改图层的系统库,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
systemLib |
String | 系统库guid或者名称 |
type |
String | 类型SymbolGeomType(GeomEnt3D,GeomLin,GeomPnt,GeomReg,GeomSur3D,Unknown) |
systemNo |
String | 符号序号 |
systemSubNo |
String | 符号子序号 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer, FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const querySymbol = resourceServer.querySymbol({
method: FetchMethod.get,
systemLib: "DefaultSystemLib",
type: "GeomPnt",
systemNo: "0",
systemSubNo: "0",
success: function (res) {
console.log("res: ", res);
},
});
# querySymbolList(options)
修改图层的系统库,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
systemLib |
String | 系统库guid或者名称 |
page |
String | 页码(默认0) |
size |
String | 分页量(默认20) |
type |
String | 类型SymbolGeomType(GeomEnt3D,GeomLin,GeomPnt,GeomReg,GeomSur3D,Unknown) |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
// ES6引入方式
import { ResourceServer } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
# querySystemColorList(options)
查询系统颜色列表
参数:
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
options |
查询参数 |
||
sysLib |
String | 系统库id,必传 |
|
headers |
String | 请求头参数 |
|
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
|
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
|
page |
Number | 1 | 页码 |
pageSize |
Number | 20 | 每页数量 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const querySystemColorList = resourceServer.querySystemColorList({
method: FetchMethod.get,
sysLib: "DefaultSystemLib",
page: 1,
pageSize: 20,
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const querySystemColorList = resourceServer.querySystemColorList({
method: FetchMethod.get,
sysLib: "DefaultSystemLib",
page: 0,
pageSize: 20,
success: function (res) {
console.log("res: ", res);
},
});
# querySystemLibList(options)
查询系统库资源列表
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const querySystemLibList = resourceServer.querySystemLibList({
method: FetchMethod.get,
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const querySystemLibList = resourceServer.querySystemLibList({
method: FetchMethod.get,
success: function (res) {
console.log("res: ", res);
},
});
# queryTempDataFeatures(options)
获取临时图层要素信息
参数:
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
options |
要素查询参数 |
||
method |
String | FetchMethod.get | 请求类型 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
|
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
|
geometry |
Geometry | 要素查询几何条件 |
|
url |
String | 图层资源的路径,可能是gdbp、filePath |
|
mapResource |
Object | 地图文档的资源,与urls二选一,mapResource优先,示例:"{"url": "/root/wuhan.mapx","mapIndex ": 0,"layerId": "string"}" |
|
where |
String | 要素查询where条件 |
|
outFields |
String | 输出属性字段,可为*表示所有,多个用英文逗号分隔 |
|
objectIds |
String | 过滤id,多个用英文逗号分隔(参数优先级很高,可能导致其它筛选条件失效) |
|
distance |
Number | 0 | 几何缓冲的距离,geometry为point、line时有效(若数据源为大数据PG数据,且geometryType为line或者point时为必填数据) |
geometryPrecision |
Number | 返回要素几何信息中坐标xy的精度 |
|
spatialRel |
SpatialRelation | 几何条件的空间判定规则,Intersects(相交)、EnvelopeIntersects(外包矩形相交)、Contains(包含)、Disjoint(相离) |
|
orderByFields |
String | 排序字段,格式: fieldName [ASC|DESC] |
|
groupByFieldsForStatistics |
String | 分组统计的字段信息,格式为field1,field2 |
|
resultRecordCount |
Number | 20 | 分页参数:结果返回条数,默认20 |
resultOffset |
Number | 分页参数:跳过条数 |
|
outStatistics |
Array | 计算一个或多个基于字段的统计信息结构,统计类型包括:FUNCTION_MAX/FUNCTION_MIN/FUNCTION_SUM/FUNCTION_AVG/FUNCTION_COUNT/FUNCTION_MAX_OID,示例:"[{"statisticType": "FUNCTION_SUM","onStatisticField": "field1","outStatisticFieldName":"fieldName1"}]" |
|
returnGeometry |
Boolean | true | 是否返回几何,默认为true |
returnAttribute |
Boolean | true | 是否返回属性,默认为true |
returnStyle |
Boolean | false | 是否返回图形参数信息,默认为false |
returnIdsOnly |
Boolean | false | 是否只返回id,默认为false |
returnCountOnly |
Boolean | false | 是否只返回条数,默认为false |
returnExtentOnly |
Boolean | false | 是否只返回范围,默认为false |
returnZ |
Boolean | false | 是否返回Z轴,默认为false |
is6xAcls |
Boolean | true | 图层资源的路径是filePath且后缀是.wt时,需要指定图层资源是否是6x注记,默认为6x点 |
示例
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const queryTempDataFeatures1 = resourceServer.queryTempDataFeatures({
method: FetchMethod.get,
url: "gdbp://MapGISLocalPlus/sample/sfcls/等值线1",
where: "高度='80'",
success: function (res) {
console.log("res: ", res);
},
});
# queryTempDataInfo(options)
获取临时数据信息
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
url |
String | 资源url |
示例
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const queryTempDataInfo = resourceServer.queryTempDataInfo({
method: FetchMethod.get,
url: "gdbp://MapGISLocalPlus/sample/sfcls/等值线1",
success: function (res) {
console.log("res: ", res);
},
});
# queryTempDataServerInfo(options)
获取临时数据服务信息
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const queryTempDataServerInfo = resourceServer.queryTempDataServerInfo({
method: FetchMethod.get,
success: function (res) {
console.log("res: ", res);
},
});
# queryTileDataSourceList(options)
获取栅格数据集列表
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
datasource |
String | 数据源名,必传 |
gdbName |
String | gdb名称,必传 |
userName |
String | 数据源用户名 |
示例
igs2.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const queryTileDataSourceList = resourceServer.queryTileDataSourceList({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryTileDataSourceList = resourceServer.queryTileDataSourceList({
method: FetchMethod.get,
datasource: "MapGISLocalPlus",
gdbName: "sample",
useName: "",
success: function (res) {
console.log("res: ", res);
},
});
# queryTileInfo(options)
获取指定瓦片详细信息,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
version |
String | 版本信息,默认为'1.0',可缺省(缺省时只返回直接发布的文档列表,如果v=2列表中将会包含目录形式发布的文档 |
name |
String | 瓦片名称,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryTileInfo = resourceServer.queryTileInfo({
method: FetchMethod.get,
name: "Tile:WorldMKTTile",
success: function (res) {
console.log("res: ", res);
},
});
# queryTileList(options)
获取发布的瓦片列表,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
version |
String | 版本信息,默认为'1.0',可缺省(缺省时只返回直接发布的文档列表,如果v=2列表中将会包含目录形式发布的文档 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryTileList = resourceServer.queryTileList({
method: FetchMethod.get,
success: function (res) {
console.log("res: ", res);
},
});
# queryVectorTileFont(options)
矢量瓦片-获取字体,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
fontstack |
String | 字体名称,必传 |
range |
String | 字体范围,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryVectorTileFont = resourceServer.queryVectorTileFont({
method: FetchMethod.get,
fontstack: "黑体",
range: "0-255.pbf",
success: function (res) {
console.log("res: ", res);
},
});
# queryVectorTileFontList(options)
矢量瓦片-获取字体列表,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryVectorTileFontList = resourceServer.queryVectorTileFontList({
method: FetchMethod.get,
success: function (res) {
console.log("res: ", res);
},
});
# queryVectorTileServiceFont(options)
矢量瓦片-获取指定服务的字体,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
serviceName |
String | 矢量瓦片服务名,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryVectorTileServiceFont = resourceServer.queryVectorTileServiceFont({
method: FetchMethod.get,
serviceName: "统一专题图",
success: function (res) {
console.log("res: ", res);
},
});
# queryVectorTileServiceSprite(options)
矢量瓦片-获取服务的sprite图,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
serviceName |
String | 矢量瓦片服务名,必传 |
format |
String | 格式,支持后缀为.json或.png,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryVectorTileServiceSprite =
resourceServer.queryVectorTileServiceSprite({
method: FetchMethod.get,
serviceName: "统一专题图",
format: ".json",
success: function (res) {
console.log("res: ", res);
},
});
# queryVectorTileServiceStyle(options)
矢量瓦片-获取指定服务的样式,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
serviceName |
String | 矢量瓦片服务名,必传 |
tpl |
String | 自定义地图模板的索引号,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryVectorTileServiceStyle = resourceServer.queryVectorTileServiceStyle({
method: FetchMethod.get,
serviceName: "统一专题图",
tpl: "0",
success: function (res) {
console.log("res: ", res);
},
});
# queryVectorTileStyle(options)
矢量瓦片-获取上传样式,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
fileName |
String | 样式文件名 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryVectorTileStyle = resourceServer.queryVectorTileStyle({
method: FetchMethod.get,
fileName: "统一专题图",
success: function (res) {
console.log("res: ", res);
},
});
# queryVectorTileStyleList(options)
矢量瓦片-获取所有上传样式列表,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const queryVectorTileStyleList = resourceServer.queryVectorTileStyleList({
method: FetchMethod.get,
success: function (res) {
console.log("res: ", res);
},
});
# removeMapLayer(options)
删除文档中指定地图中指定图层,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
docName |
String | 地图文档名称,必传 |
mapIndex |
String | 地图索引,必传 |
layerIndexs |
String | 图层索引列表(多个用英文逗号分隔) |
guid |
String | 用户会话id |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const removeMapLayer = resourceServer.removeMapLayer({
method: FetchMethod.get,
docName: "sz",
mapIndex: "新地图1",
layerIndexs: "0",
success: function (res) {
console.log("res: ", res);
},
});
# updateLayerInGdbp(options)
更新GDB数据库中的一个图层,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
gdbSvrName |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
featureType |
String | 要素类型,必传,要素类型:SFeatureCls或AnnotationCls |
layerName |
String | 图层名称,必传 |
updateObject |
Object | 更新参数,必传,例如{"SrsName":"WGS1984_度","LayerName":"图层名"} |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const updateLayerInGdbp = resourceServer.updateLayerInGdbp({
method: FetchMethod.get,
gdbSvrName: "MapGISLocalPlus",
gdbName: "sample",
featureType: "SfeatureCls",
layerName: "等值线",
updateObject: {
SrsName: "WGS1984_度",
LayerName: "图层名",
},
success: function (res) {
console.log("res: ", res);
},
});
# updateSimpleFeature(options)
更新单个简单要素类信息
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
datasource |
String | 数据源名称,必传 |
gdbName |
String | gdb名称,必传 |
featureSetName |
String | 简单要素类名称,必传 |
updateInfo |
Object | 更新的信息,必传 |
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
userName |
String | 数据源用户名 |
示例
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/services/system/ResourceServer",
});
const updateSimpleFeature = resourceServer.updateSimpleFeature({
method: FetchMethod.put,
datasource: "MapGISLocalPlus",
gdbName: "sample",
featureSetName: "等值线1",
updateInfo: {
name: "等值线",
srs: "WGS1984_度",
},
success: function (res) {
console.log("res: ", res);
},
});
# updateVectorTileServiceStyle(options)
更新指定服务的样式,仅支持igs1.0
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
查询参数 |
|
headers |
String | 请求头参数 |
success |
function | 查询成功回调函数,若使用Promise方式则不必填写 |
failure |
function | 查询失败回调函数,若使用Promise方式则不必填写 |
serviceName |
String | 矢量瓦片服务名,必传 |
updateObject |
Object | 更新参数,必传 |
示例
igs1.0
// ES5引入方式
const { ResourceServer } = zondy.service
const { FetchMethod } = zondy.enum
// ES6引入方式
import { ResourceServer,FetchMethod } from "@mapgis/webclient-common"
const resourceServer = new ResourceServer({
//服务地址
url: "http://localhost:8089/igs/rest/mrcs",
});
const updateVectorTileServiceStyle =
resourceServer.updateVectorTileServiceStyle({
method: FetchMethod.post,
serviceName: "统一专题图",
updateObject: {},
success: function (res) {
console.log("res: ", res);
},
});