Class: clientComputationViewModel

clientComputationViewModel

Client Computation ViewModel。

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

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
data Object

The data returned after successful analysis.

layerloaded

ClientComputationViewModel.js, line 162

Fires when the layer is loaded.

Properties:
Name Type Description
layer L.GeoJSON

The result layer after loading is complete.

name string

The result layer name after loading is complete.

layersremoved

ClientComputationViewModel.js, line 223

Triggered after the layer is deleted.

Properties:
Name Type Description
layer Array.<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
params Object

The client calculates the parameters.

map L.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
layersArr Array.<L.GeoJSON>

An array of layers.

Returns:
Type Description
Object Layers data.