# new PostgisQueryService(option)
参数:
名称 | 类型 | 描述 |
---|---|---|
option |
PostgisQueryParameter | 查询条件 |
path |
String | 库名称/工作空间 |
tableNames |
String | 表名,多个用逗号分隔,如:X431102TDXZ2005GDLTB,dltb2005 |
成员变量
# fields
统计计算中用于分组字段名列表,用逗号分隔
- See:
-
- 该属性与segments冲突,不能同时存在
查看源代码 service/datastore/postgis/PostgisQueryService.js, line 50
# geoFormat
几何类型,支持wkt、geojson、circle、rect四种, 其中当为circle时,geometry格式为:x坐标,y坐标,半径; 当为rect时,geometry格式为:xmin,ymin,xmax,ymax
# includeGeometry
返回结果是否包含几何
- Default Value:
- true*
查看源代码 service/datastore/postgis/PostgisQueryService.js, line 74
# includeProperites
返回结果是否包含属性
- Default Value:
- false
查看源代码 service/datastore/postgis/PostgisQueryService.js, line 68
# path
库名称/工作空间/表名称
- See:
-
- 映射平台的pglink/hdf/layer
查看源代码 service/datastore/postgis/PostgisQueryService.js, line 20
# segments
分段分组条件,如["银行<1000","银行 between 1000 and 4000"]
- See:
-
- 该属性与fields冲突,不能同时存在
查看源代码 service/datastore/postgis/PostgisQueryService.js, line 56
# sref
动态投影坐标系ID,支持MapGIS和EPSG标准编号, 其中MapGIS只支持当前库中自带的坐标系的ID,EPSG标准请使用EPSG:4326格式, 若指定了该参数,则系统认为geometry的坐标系为此坐标系
# statisticFields
Json格式,[field] 方法类型:count,min,max,mean,sum,variance(方差),stddev(标准差)
- See:
-
- 激活属性统计信息后,由于一些特定的统计聚类函数,几何字段会丢失
查看源代码 service/datastore/postgis/PostgisQueryService.js, line 62
方法
# query(onSuccess, onError)
查询函数,向服务器发送请求,返回地名地址格式数据
参数:
名称 | 类型 | 描述 |
---|---|---|
onSuccess |
function | 查询成功回调函数。 |
onError |
function | 查询失败回调函数。 |