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 |
参数。
|
- 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 查询方式。