Class: QueryByDistanceParameters

SuperMap.QueryByDistanceParameters

The QueryByDistanceParameters class. This class is used to set parameters of the distance query.

new SuperMap.QueryByDistanceParameters(options)

QueryByDistanceParameters.js, line 8
Name Type Description
options Object

The parameters.

Name Type Default Description
geometry Object

The geometry object to query.

queryParams Array.<SuperMap.FilterParameter>

The FilterParameter array.

customParams string optional

The custom parameter, used for extension.

prjCoordSys Object optional

It is a custom parameter for the use of extension of dynamic projection query provided by SuperMap Online. For instance: {"epsgCode":3857}.

expectCount number 100000 optional

The number of records that is expected to return.

networkType SuperMap.GeometryType SuperMap.GeometryType.LINE optional

The GeometryType for network dataset.

queryOption SuperMap.QueryOption SuperMap.QueryOption.ATTRIBUTEANDGEOMETRY optional

The QueryOption enumeration class.

startRecord number 0 optional

The start record number for query.

holdTime number 10 optional

The time that the resource saves in the server.

returnCustomResult boolean false optional

It is only for the use of 3D.

distance number 0 optional

The distance query.

isNearest boolean false optional

Whether it is the nearest distance query.

returnContent boolean true optional

Whether to return the new created resource representation or return the URL of the new resource.

returnFeatureWithFieldCaption boolean false optional

The returned query result feature field ID is a field alias. When false, returns the field name; when true, returns the field alias.

Extends

Members

customParamsstring

The custom parameter, used for extension.

distancenumber

Query distance, the unit is the same with the corresponding dataset unit. When finding the most nearest feature, this property is not valid.

expectCountnumber

The number of records that is expected to return. If it is less than 100,000, the actual number of the records will be returned.

Default Value:
100000

geometry

The geometry object to query.
The point type could be: SuperMap.Geometry.Point|L.Point|L.GeoJSON|ol.geom.Point|ol.format.GeoJSON。
The line type could be: SuperMap.Geometry.LineString|SuperMap.Geometry.LinearRing|L.Polyline|L.GeoJSON|ol.geom.LineString|ol.format.GeoJSON。
The polygon type could be: SuperMap.Geometry.Polygon|L.Polygon|L.GeoJSON|ol.geom.Polygon|ol.format.GeoJSON。

holdTimenumber

The time that the resource saves in the server.

Default Value:
10

isNearestboolean

Whether to be closest query.
It is suggested to use it with expectCount(Inherited from SuperMap.QueryParameters). True means to query the closest features. If the number of the queried results is greater than expectCount, it will return the closest features whose number is expectCount. If it is not true and the number of the queried results is greater than expectCount, it will return the randomly selected features from the total query records whose number is expectCount. At present, the query results do not support sorting by distance.

The network dataset is divided into two types: one is the point and the other is the line.

Default Value:
SuperMap.GeometryType.LINE

prjCoordSysObject

It is a custom parameter for the use of extension of dynamic projection query provided by SuperMap Online. For instance: {"epsgCode":3857}.

The QueryOption enumeration class. This class describes the returned types of query results, including properties, geometry entities, or both.

Default Value:
SuperMap.QueryOption.ATTRIBUTEANDGEOMETRY

queryParamsArray.<SuperMap.FilterParameter>

The FilterParameter array. This class is used to set the query dataset and the qeury filter.

returnContentboolean

Whether to return the new created resource representation or return the URL of the new resource.
If the result is true, then the new created resource, i.e., the the query result representation.
If the result is false, the URI of the querying result is returned.

Default Value:
true

returnCustomResultboolean

It is only for the use of 3D.

returnFeatureWithFieldCaptionboolean

The returned query result feature field ID is a field alias. When false, returns the field name; when true, returns the field alias.

startRecordnumber

The start record number for query.

Methods

destroy()

QueryByDistanceParameters.js, line 79

Disposes the resource. The property that references resource is set to null.