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 '@supermapgis/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 58 -
广播失败。
-
broadcastSocketConnected
leaflet/services/DataFlowService.js, line 50 -
broadcast Socket 连接成功。
-
broadcastSocketError
leaflet/services/DataFlowService.js, line 54 -
broadcast Socket 连接失败。
-
broadcastSucceeded
leaflet/services/DataFlowService.js, line 62 -
广播成功。
-
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 74 -
获取信息成功。
-
setFilterParamSucceeded
leaflet/services/DataFlowService.js, line 78 -
设置过滤参数成功。
-
subscribeSocketConnected
leaflet/services/DataFlowService.js, line 66 -
订阅数据连接成功。
-
subscribeSocketError
leaflet/services/DataFlowService.js, line 70 -
订阅数据连接失败。
Methods
-
broadcast(obj)
leaflet/services/DataFlowService.js, line 104 -
加载广播数据。
Name Type Description obj
JSONObject JSON 格式的要素数据。
-
inherited destroy()
leaflet/services/ServiceBase.js, line 47 -
释放资源,将引用的资源属性置空。
-
initBroadcast()
leaflet/services/DataFlowService.js, line 95 -
初始化广播。
-
initSubscribe()
leaflet/services/DataFlowService.js, line 113 -
初始化订阅数据。
-
setExcludeField(excludeField)
leaflet/services/DataFlowService.js, line 123 -
设置排除字段。
Name Type Description excludeField
Object 排除字段。
-
setGeometry(geometry)
leaflet/services/DataFlowService.js, line 134 -
设置添加的 GeoJSON 几何要素数据。
Name Type Description geometry
GeoJSONObject 指定几何范围,只有在该范围内的要素才能被订阅。
-
unBroadcast()
leaflet/services/DataFlowService.js, line 153 -
结束加载广播。
-
unSubscribe()
leaflet/services/DataFlowService.js, line 145 -
结束订阅数据。