L.supermap.components.clientComputationViewModel(workerUrl)
ClientComputationViewModel.js, line 10
| Name | Type | Description |
|---|---|---|
workerUrl |
string |
The worker address, the original location is dist/leaflet/workers/TurfWorker.js. |
- Version:
- 9.1.1
Fires
- L.supermap.components.clientComputationViewModel#event:analysisfailed
- L.supermap.components.clientComputationViewModel#event:analysissucceeded
- L.supermap.components.clientComputationViewModel#event:layerloaded
- L.supermap.components.clientComputationViewModel#event:layersremoved
Extends
clientComputationViewModel
-> L.Evented
Events
-
analysisfailed
ClientComputationViewModel.js, line 126 -
Triggered after the event analysis failed, and the returned result is empty.
-
analysissucceed
ClientComputationViewModel.js, line 132 -
Triggered after successful analysis.
Properties:
Name Type Description dataObject The data returned after successful analysis.
-
layerloaded
ClientComputationViewModel.js, line 162 -
Fires when the layer is loaded.
Properties:
Name Type Description layerL.GeoJSON The result layer after loading is complete.
namestring The result layer name after loading is complete.
-
layersremoved
ClientComputationViewModel.js, line 223 -
Triggered after the layer is deleted.
Properties:
Name Type Description layerArray.<L.GeoJSON> The array of layers that need to be removed.
Methods
-
analysis(params, map)
ClientComputationViewModel.js, line 98 -
Perform client computing.
Name Type Description paramsObject The client calculates the parameters.
mapL.Map Leaflet Map object.
-
cancelAnalysis()
ClientComputationViewModel.js, line 231 -
Cancel the analysis.
-
clearLayers()
ClientComputationViewModel.js, line 215 -
clear the analysis layer.
-
getLayersData(layersArr){Object}
ClientComputationViewModel.js, line 28 -
Get the data populated into the view.
Name Type Description layersArrArray.<L.GeoJSON> An array of layers.
Returns:
Type Description Object Layers data.