new RegionParameter(optionsopt)
A parameter that specifies a particular region.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Object with the following properties: Properties
|
- Source:
Extends
Members
_defaultValue
Gets the default value for this parameter, or undefined if there is no default value.
- Inherited From:
- Source:
availableFormatters
Gets the formatters that are available to format the parameter's value.
- Inherited From:
- Source:
catalogFunction :CatalogFunction
Gets the function to which this is a parameter.
Type:
- Inherited From:
- Source:
converter :Any
A converter that can be used to convert this parameter for use with a CatalogFunction. The actual type and content of this property is defined by the catalog function.
Type:
- Any
- Inherited From:
- Source:
defaultValue :*
Gets the default value for this parameter, or undefined if there is no default value.
Type:
- *
- Inherited From:
- Source:
description :String
Gets or sets the description of the parameter.
Type:
- String
- Inherited From:
- Source:
formatter :String
Gets or sets the formatter (from the set defined by FunctionParameter#availableFormatters) to use to format this parameter to pass to the CatalogFunction.
Type:
- String
- Inherited From:
- Source:
id :String
Gets the ID of the parameter.
Type:
- String
- Inherited From:
- Source:
isLoading :Boolean
Gets or sets a value indicating whether the parameter is currently loading. This property is observable.
Type:
- Boolean
- Inherited From:
- Source:
isRequired :Boolean
Gets or sets a value indicating whether this parameter is required.
Type:
- Boolean
- Inherited From:
- Default Value:
- false
- Source:
name :String
Gets or sets the name of the parameter.
Type:
- String
- Inherited From:
- Source:
regionProvider :RegionProvider
Gets the region provider indicating the type of region that this property holds data for.
Type:
- Source:
regionTypeParameter :RegionTypeParameter
Gets the RegionTypeParameter that specifies the type of region, if it exists.
Type:
- Source:
terria :Terria
Gets the Terria instance associated with this parameter.
Type:
- Inherited From:
- Source:
type :String
Gets the type of this parameter.
Type:
- String
- Overrides:
- Source:
value :Object
Gets or sets the value of this parameter. The value is an actual region, i.e. from RegionProvider#regions. However, it may be set as a string, in which case a string is treated as the ID of a region and the actual region object is looked up with the region provider.
Type:
- Object
- Overrides:
- Source:
Methods
findRegionByID(regionID) → {Region}
Finds a region with a given region ID.
Parameters:
| Name | Type | Description |
|---|---|---|
regionID |
String | The ID of the region to find. |
- Source:
Returns:
The region, or undefined if no region matching the ID was found.
- Type
- Region
formatForService(valueopt) → {Any}
Formats this value to pass to a service. The format is controlled by the FunctionParameter#formatter property.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
value |
Object |
<optional> |
Value to format as string. If not specified, FunctionParameter#value is used. |
- Inherited From:
- Source:
Returns:
The formatted value.
- Type
- Any
formatValueAsString(valueopt) → {String}
Represents value as string.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
value |
Object |
<optional> |
Value to format as string. If not specified, FunctionParameter#value is used. |
- Inherited From:
- Source:
Returns:
String representation of the value.
- Type
- String
serializeToJson() → {Object}
Serializes the data item to JSON.
- Inherited From:
- Source:
Returns:
The serialized JSON object-literal.
- Type
- Object
updateFromJson(json) → {Promise}
Updates the function parameter from a JSON object-literal description of it.
Parameters:
| Name | Type | Description |
|---|---|---|
json |
Object | The JSON description. The JSON should be in the form of an object literal, not a string. |
- Inherited From:
- Source:
Returns:
A promise that resolves when the update is complete.
- Type
- Promise