new DataFlowService(url, options)
Usage
// 浏览器
<script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
<script>
new L.supermap.DataFlowService(url, options);
// 弃用的写法
L.supermap.dataFlowService(url, options);
</script>
// ES6 Import
import { DataFlowService } from '@supermap/iclient-leaflet';
new DataFlowService(url, options);
leaflet/services/DataFlowService.js, line 9
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string |
服务地址。 |
|||||||||||||||||||||
options |
Object |
参数。
|
Fires
Extends
Events
-
broadcastFailed
leaflet/services/DataFlowService.js, line 57 -
广播失败。
-
broadcastSocketConnected
leaflet/services/DataFlowService.js, line 49 -
broadcast Socket 连接成功。
-
broadcastSocketError
leaflet/services/DataFlowService.js, line 53 -
broadcast Socket 连接失败。
-
broadcastSucceeded
leaflet/services/DataFlowService.js, line 61 -
广播成功。
-
inherited destroy
leaflet/services/ServiceBase.js, line 52 -
资源释放成功后触发。
Properties:
Name Type Description this
ServiceBase this 对象。
-
inherited initialized
leaflet/services/ServiceBase.js, line 39 -
构造函数构造成功后触发。
Properties:
Name Type Description this
ServiceBase this 对象。
-
messageSucceeded
leaflet/services/DataFlowService.js, line 73 -
获取信息成功。
-
setFilterParamSucceeded
leaflet/services/DataFlowService.js, line 77 -
设置过滤参数成功。
-
subscribeSocketConnected
leaflet/services/DataFlowService.js, line 65 -
订阅数据连接成功。
-
subscribeSocketError
leaflet/services/DataFlowService.js, line 69 -
订阅数据连接失败。
Methods
-
broadcast(obj)
leaflet/services/DataFlowService.js, line 103 -
加载广播数据。
Name Type Description obj
JSONObject JSON 格式的要素数据。
-
inherited destroy()
leaflet/services/ServiceBase.js, line 47 -
释放资源,将引用的资源属性置空。
-
initBroadcast()
leaflet/services/DataFlowService.js, line 94 -
初始化广播。
-
initSubscribe()
leaflet/services/DataFlowService.js, line 112 -
初始化订阅数据。
-
setExcludeField(excludeField)
leaflet/services/DataFlowService.js, line 122 -
设置排除字段。
Name Type Description excludeField
Object 排除字段。
-
setGeometry(geometry)
leaflet/services/DataFlowService.js, line 133 -
设置添加的 GeoJSON 几何要素数据。
Name Type Description geometry
GeoJSONObject 指定几何范围,该范围内的要素才能被订阅。
-
unBroadcast()
leaflet/services/DataFlowService.js, line 152 -
结束加载广播。
-
unSubscribe()
leaflet/services/DataFlowService.js, line 144 -
结束订阅数据。