Using data flow service

Feedback


All the data flow services published are listed in the service list of iServer. You can click {servicename}/dataflow to access the REST page of data flow services. You will see the two interfaces: broadcast and subscribe.

Click and open the broadcast page, and input the data you want to broadcast in GeoJSON format.

On the subscribe page, you can receive the data that is in the streaming process.

Use data flow service in iClient JavaScript 11i(2023)

You can display data flow in the applications developed using iClient JavaScript 11i(2023). Open the iClient data flow address: http://iclient.supermap.com/examples/leaflet/editor.html#dataFlowService, and view the data broadcasted in the map. Click “Source Code” on the top right to check the JavaScript source code.

Here is the sample code:

//Create a realtime big data layer
var urlDataFlow = "ws://localhost:8800/iserver/services/dataflow/dataflow";
var dataFlowLayer = L.supermap.dataFlowLayer(urlDataFlow, { 
//Optional parameter, returned only when GeoJSON elements filter elements within this extent
geometry:{coordinates:[[[116.38,39.87],[116.41,39.87],[116.41,39.84],[116.38, 39.84],[116.38,39.87]]],type:"Polygon"}, 
//Optional parameter. Return field values that are not contained in the elements
 excludeField:["id"], 
//Optional parameter. Return element coordinate system
 prjCoordSys:4326 
 });
 dataFlowLayer.addTo(map);

 

Run and display the following: