Analyses class
Provides access to the analyses functionality of GeoApps. Can be accessed through the Map.Analyses
-property.
export declare class Analyses
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Analyses
class.
Example
An example of the usage:
// Connect as anonymous user to a geoapps environment
geoapps.Initialize("<specified tenant>");
// Add the map to a div with element id `map`
var map = geoapps.AddMap("map", "<mapId>");
// Wait till the map loaded, before starting the analyses
map.onLoaded.add(() => {
// Analyses
map.Analyses.onLoaded.add(function () {
console.log(map.Analyses.Items);
});
map.Analyses.onAnalysisLoaded.add(function () {
console.log(map.Analyses.Scenarios);
console.log(map.Analyses.Parameters);
});
map.Analyses.onAnalysisCompleted.add(function () {
console.log(map.Analyses.Results);
});
// Trigger on draw complete
map.Interactions.onSketchCompleted.add(function(e) {
map.Interactions.StopSketch();
map.Analyses.UpdateSelection({
type: "geometry",
geometry: e.Wkt,
})
});
});
Events
Property | Modifiers | Type | Description |
---|---|---|---|
onAnalysisCompleted | readonly | GAEvent<GAEventArgs> | Triggers when an analyses has been computed |
onAnalysisLoaded | readonly | GAEvent<GAEventArgs> | Triggers when the details of an analyses has been loaded |
onDownloadCompleted | readonly | GAEvent<GAEventArgs> | Triggers when the analyses download has been completed |
onLoaded | readonly | GAEvent<GAEventArgs> | Triggers when the list of analyses is loaded |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
ActiveAnalysis | Analysis | The currently active analysis | |
ActiveAnalysisLayers | string[] | Layer id's of the layers in the active analysis | |
ActiveFeatureCount | number | Number of features selected in the active analysis | |
AnalysisBusy | boolean | Whether analysis is busy calculating | |
ContainsAnalyses | readonly | boolean | Whether the chosen thememap contains analyses |
HasDownload | boolean | Whether analysis results can be downloaded | |
HasResults | boolean | Whether analysis has results | |
Items | readonly | Analysis[] | The current available analyses |
Parameters | readonly | AnalysisParameterValue[] | The current parameters for the specified analyses |
Results | readonly | AnalysisResult[] | The last computed results |
Scenarios | readonly | AnalysisCompute[] | The available scenarios for the current analysis |
ShowValidationError | boolean | Whether to show an error for incorrect user input | |
ValidatedInput | boolean | Whether user input has been validated and is of the expected type |
Methods
Method | Modifiers | Description |
---|---|---|
DownloadPdf() | Export analysis result to PDF | |
GetAnalysisById(analysisId) | Retrieve the specific analysis by the specified id | |
StartAnalysis(analysisId, selectionOptions) | Initialize the analysis and retrieve the available scenario's and parameters | |
UpdateParameters(parameters) | Update the vaue of the parameters | |
UpdateSelection(options) | Update the vaue of the parameters |