Class: GetFeaturesByBoundsParameters

GetFeaturesByBoundsParameters

数据集范围查询参数类,该类用于设置数据集范围查询的相关参数。

new GetFeaturesByBoundsParameters(options)

Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/openlayers/iclient-ol.js"></script>
<script>
  new ol.supermap.GetFeaturesByBoundsParameters(options);
  
  // 弃用的写法
  new SuperMap.GetFeaturesByBoundsParameters(options);

</script>

// ES6 Import
import { GetFeaturesByBoundsParameters } from '@supermap/iclient-ol';

new GetFeaturesByBoundsParameters(options);

common/iServer/GetFeaturesByBoundsParameters.js, line 9
Name Type Description
options Object

参数。

Name Type Default Description
bounds SuperMap.Bounds | L.Bounds | L.LatLngBounds | ol.extent | mapboxgl.LngLatBounds | GeoJSONObject

查询的范围对象。

datasetNames Array.<string>

数据集名称列表。

attributeFilter string 可选

范围查询属性过滤条件。

fields Array.<string> 可选

设置查询结果返回字段。默认返回所有字段。

spatialQueryMode SpatialQueryMode SpatialQueryMode.CONTAIN 可选

空间查询模式常量。

returnContent boolean true 可选

是否直接返回查询结果。

fromIndex number 0 可选

查询结果的最小索引号。

toIndex number 19 可选

查询结果的最大索引号。

targetEpsgCode string | number 可选

动态投影的目标坐标系对应的 EPSG Code,使用此参数时,returnContent 参数需为 true。

targetPrj Object 可选

动态投影的目标坐标系。使用此参数时,returnContent 参数需为 true。如:prjCoordSys={"epsgCode":3857}。当同时设置 targetEpsgCode 参数时,此参数不生效。

aggregations MetricsAggParameter | GeoHashGridAggParameter 可选

聚合查询参数。该参数仅支持数据来源 Elasticsearch 服务的Supermap iServer的rest数据服务。

Extends

Members

聚合查询参数,该参数仅支持数据来源 Elasticsearch 服务的Supermap iServer的rest数据服务。

attributeFilterstring

范围查询属性过滤条件。

用于查询的范围对象。

datasetNameArray.<string>

数据集集合中的数据集名称列表。

fieldsArray.<string>

设置查询结果返回字段。当指定了返回结果字段后,则 GetFeaturesResult 中的 features 的属性字段只包含所指定的字段。不设置即返回全部字段。

fromIndexnumber

查询结果的最小索引号。如果该值大于查询结果的最大索引号,则查询结果为空。

getFeatureModestring

数据集查询模式。范围查询有 "BOUNDS","BOUNDS_ATTRIBUTEFILTER" 两种,当用户设置 attributeFilter 时会自动切换到 BOUNDS_ATTRIBUTEFILTER 访问服务。

hasGeometrynumber

返回结果是否包含Geometry。

Default Value:
true

maxFeaturesnumber

进行 SQL 查询时,用于设置服务端返回查询结果条目数量。

Default Value:
1000

returnContentboolean

是否立即返回新创建资源的表述还是返回新资源的 URI。 如果为 true,则直接返回新创建资源,即查询结果的表述。 如果为 false,则返回的是查询结果资源的 URI。

Default Value:
true

returnCountOnlyboolean

只返回查询结果的总数。

spatialQueryModeSpatialQueryMode

空间查询模式常量。

Default Value:
SpatialQueryMode.CONTAIN

targetEpsgCodestring

动态投影的目标坐标系对应的 EPSG Code,使用时需设置 returnContent 参数为 true。

targetPrjObject

动态投影的目标坐标系。使用时需设置 returnContent 参数为 true。如:prjCoordSys={"epsgCode":3857}。当同时设置 targetEpsgCode 参数时,此参数不生效。

toIndexnumber

查询结果的最大索引号。如果该值大于查询结果的最大索引号,则以查询结果的最大索引号为终止索引号。

Default Value:
19

Methods

static toJsonParameters(params){string}

common/iServer/GetFeaturesByBoundsParameters.js, line 90

GetFeaturesByBoundsParameters 对象参数转换为 JSON 字符串。

Name Type Description
params GetFeaturesByBoundsParameters

范围查询参数。

Returns:
Type Description
string 转化后的 JSON 字符串。

inherited destroy()

common/iServer/GetFeaturesByBoundsParameters.js, line 68

释放资源,将引用资源的属性置空。