new SearchView(options)
Usage
import { SearchView } from '@supermapgis/iclient-leaflet';
new SearchView(options);<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
new L.supermap.Components.Search({paramsNames});
// 弃用的写法
L.supermap.components.search(options);
</script>
leaflet/components/search/SearchView.js, line 15
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
参数。
|
- Version:
- 9.1.1
Fires
Extends
SearchView
-> ComponentsViewBase
-> L.Control
Events
-
geocodesucceeded
leaflet/components/search/SearchView.js, line 512 -
地址匹配服务成功后触发。
Properties:
Name Type Description resultObject 事件返回的 GeoJSON 格式数据对象。
-
searchfailed
leaflet/components/search/SearchView.js, line 533 -
图层属性查询失败后触发。
Properties:
Name Type Description messagestring 失败原因。
-
searchlayersucceeded
leaflet/components/search/SearchView.js, line 483 -
图层查询成功后触发。
Properties:
Name Type Description resultObject 事件返回的 GeoJSON 格式数据对象。
Methods
-
addSearchLayer(layers)
leaflet/components/search/SearchView.js, line 74 -
添加可查询的图层。
Name Type Description layersArray.<L.GeoJSON> | L.GeoJSON 可查询的图层。
-
clearSearchResult()
leaflet/components/search/SearchView.js, line 658 -
清空查询结果。
-
inherited off(eventType, callback)
leaflet/components/ComponentsViewBase.js, line 78 -
事件关闭。
Name Type Description eventTypestring 监听的事件名。
callbackfunction 监听事件的回调函数。
-
inherited on(eventType, callback)
leaflet/components/ComponentsViewBase.js, line 68 -
事件绑定。
Name Type Description eventTypestring 监听的事件类型。
callbackfunction 监听事件的回调函数。