Class: DataServiceQueryView

DataServiceQueryView

数据服务查询组件类。

new DataServiceQueryView(dataServiceUrl, dataSetNames, options)

Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
  new L.supermap.Components.DataServiceQueryView(dataServiceUrl, dataSetNames, options);
  
  // 弃用的写法
  L.supermap.components.dataServiceQuery(dataServiceUrl, dataSetNames, options);
  
</script>

// ES6 Import
import { DataServiceQueryView } from '@supermapgis/iclient-leaflet';

new DataServiceQueryView(dataServiceUrl, dataSetNames, options);

leaflet/components/dataservicequery/DataServiceQueryView.js, line 17
Name Type Description
dataServiceUrl string

数据服务地址。

dataSetNames Array.<string> | string

配置查询方式和查询的数据集数组。格式:" 数据源名:数据集名 ",例:"World: Countries"。

options Object

参数。

Name Type Default Description
getFeatureMode Array.<GetFeatureMode> | GetFeatureMode 可选

查询方式。

position string 'topright' 可选

组件在地图中显示的位置( 'topleft'|'topright'|'bottomleft'|'bottomright' )。

style function 可选

默认图层样式。返回类型:点样式( maker|circleMaker);线和面样式( L.path )。

onEachFeature function 可选

给该元素绑定事件和弹窗。

Version:
  • 9.1.1
Fires

Extends

Events

getfeaturesfailed

leaflet/components/dataservicequery/DataServiceQueryView.js, line 274

features 获取失败时触发。

Properties:
Name Type Description
error string

服务器返回的错误。

getfeaturessucceeded

leaflet/components/dataservicequery/DataServiceQueryView.js, line 263

features 获取成功时触发。

Properties:
Name Type Description
result Object

服务器返回的结果。

Methods

inherited off(eventType, callback)

leaflet/components/ComponentsViewBase.js, line 78

事件关闭。

Name Type Description
eventType string

监听的事件名。

callback function

监听事件的回调函数。

inherited on(eventType, callback)

leaflet/components/ComponentsViewBase.js, line 68

事件绑定。

Name Type Description
eventType string

监听的事件类型。

callback function

监听事件的回调函数。

setDataServiceUrl(dataServiceUrl)

leaflet/components/dataservicequery/DataServiceQueryView.js, line 94

设置查询的数据服务地址。

Name Type Description
dataServiceUrl string

数据服务地址。

setDataSetNames(dataSetNames)

leaflet/components/dataservicequery/DataServiceQueryView.js, line 72

设置查询的数据集名称。

Name Type Description
dataSetNames Array.<string> | string

配置查询方式和查询的数据集数组。格式:" 数据源名:数据集名 ",例:"World: Countries";

setGetFeatureMode(getFeatureMode)

leaflet/components/dataservicequery/DataServiceQueryView.js, line 85

设置查询方式。

Name Type Description
getFeatureMode Array.<GetFeatureMode> | GetFeatureMode

查询方式。