Skip to main content
Version: Next

useFunction()

function useFunction<ResultType>(functionTitle, extraParams): FunctionState<ResultType>

Runs the given geoprocessing function for the current sketch, as defined by ReportContext During testing, useFunction will look for example output values in SketchContext.exampleOutputs

Type Parameters

Type Parameter
ResultType

Parameters

ParameterTypeDescription
functionTitlestringTitle of geoprocessing function in this project to run. Todo support external project function
extraParamsGeoprocessingRequestParamsAdditional runtime parameters from report client for geoprocessing function. Validation left to implementing function

Returns

FunctionState<ResultType>