Class: query

L.supermap.plotting.query

几何查询类。

L.supermap.plotting.query(map)

leaflet/plot/Query.js, line 4
Name Type Description
map L.map

当前地图。

Members

mapObject

当前要查询的地图。

Methods

captureGObject(latLng){Array.<L.supermap.plotting.PlottingObject>}

leaflet/plot/Query.js, line 35

查询指定位置的所有图形。

Name Type Description
latLng L.LatLng

指定的点坐标。

Returns:
Type Description
Array.<L.supermap.plotting.PlottingObject> 位于指定点的标绘对象,如果没有位于该点的标绘对象,则返回空数组。

destroy()

leaflet/plot/Query.js, line 26

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

getGObjectsInCircle(centerLatLng, radius){Array.<L.supermap.plotting.PlottingObject>}

leaflet/plot/Query.js, line 142

获取圆区域内的图形对象。

Name Type Description
centerLatLng L.LatLng

圆的中心点。

radius number

圆的半径。

Returns:
Type Description
Array.<L.supermap.plotting.PlottingObject> 返回位于圆形内的标绘对象集合,如果没有位于圆形内的标绘对象,则返回空数组。

getGObjectsInPolygon(latLngs){Array.<L.supermap.plotting.PlottingObject>}

leaflet/plot/Query.js, line 64

获取多边形区域内的图形对象。

Name Type Description
latLngs Array.<L.LatLng>

多边形的坐标点。

Returns:
Type Description
Array.<L.supermap.plotting.PlottingObject> 位于多边形内的图形标绘对象,如果没有位于多边形内的标绘对象,则返回空数组。

getGObjectsInRect(firstLngLat, lastLngLat){Array.<L.supermap.plotting.PlottingObject>}

leaflet/plot/Query.js, line 173

获取矩形区域内的图形对象。

Name Type Description
firstLngLat L.LatLng

矩形区域左上角经纬度坐标。

lastLngLat L.LatLng

矩形区域右下角经纬度坐标。

Returns:
Type Description
Array.<L.supermap.plotting.PlottingObject> 位于矩形内的标绘对象集合,如果没有位于矩形内的标绘对象,则返回空数组。