new mapboxgl.supermap.DataFlowService(url, options)
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string |
The url of service. |
|||||||||||||||
options |
Object |
The optional parameters.
|
Fires
- mapboxgl.supermap.DataFlowService#event:broadcastSocketConnected
- mapboxgl.supermap.DataFlowService#event:broadcastSocketError
- mapboxgl.supermap.DataFlowService#event:broadcastFailed
- mapboxgl.supermap.DataFlowService#event:broadcastSucceeded
- mapboxgl.supermap.DataFlowService#event:subscribeSocketError
- mapboxgl.supermap.DataFlowService#event:messageSucceeded
- mapboxgl.supermap.DataFlowService#event:setFilterParamSucceeded
Example
new mapboxgl.supermap.DataFlowService(url)
.queryChart(param,function(result){
//doSomething
})
Extends
Events
-
broadcastFailed
DataFlowService.js, line 48 -
The broadcast failed.
-
broadcastSocketConnected
DataFlowService.js, line 40 -
The broadcast Socket connection is successful.
-
broadcastSocketError
DataFlowService.js, line 44 -
The broadcast Socket connection failed.
-
broadcastSucceeded
DataFlowService.js, line 52 -
The broadcast was successful.
-
inherited initialized
ServiceBase.js, line 23 -
Triggered after the constructor construct succeeds.
Properties:
Name Type Description this
Object This object.
-
messageSucceeded
DataFlowService.js, line 64 -
The information was obtained successfully.
-
setFilterParamSucceeded
DataFlowService.js, line 68 -
Set the filter parameters successfully.
-
subscribeSocketConnected
DataFlowService.js, line 56 -
The subscription data connection was successful.
-
subscribeSocketError
DataFlowService.js, line 60 -
Subscription data connection failed.
-
subscribeSucceeded
DataFlowService.js, line 85 -
Triggered after the data stream service subscription is successful.
Properties:
Name Type Description e
Object Event object.
Methods
-
broadcast(obj)
DataFlowService.js, line 106 -
Load broadcast data.
Name Type Description obj
JSON Data in JSON format.
-
initBroadcast(){mapboxgl.supermap.DataFlowService}
DataFlowService.js, line 96 -
Initialize the subscription.
Returns:
Type Description mapboxgl.supermap.DataFlowService -
initSubscribe()
DataFlowService.js, line 115 -
Initialize the subscription.
-
setExcludeField(excludeField)
DataFlowService.js, line 125 -
Set field to be excluded.
Name Type Description excludeField
Object Field to be excluded.
-
setGeometry(geometry)
DataFlowService.js, line 136 -
Set GeoJSON geometry data to be added.
Name Type Description geometry
Array.<Object> Array of GeoJSON geometry data to be added.
-
unBroadcast()
DataFlowService.js, line 155 -
End the broadcast.
-
unSubscribe()
DataFlowService.js, line 147 -
End the subscription.