SensorObservationServiceCatalogItem

SensorObservationServiceCatalogItem

new SensorObservationServiceCatalogItem(terria, urlopt)

Source:

A CatalogItem representing data obtained from a Sensor Observation Service (SOS) 2.0 server. The SOS specifications are available at http://www.opengeospatial.org/standards/sos . This requires a json configuration file which specifies the procedures and observableProperties to show. If more than one procedure or observableProperty is provided, the user can choose between the options. Note because of this need for configuration, there is no SOS catalog "group" (yet).

The offerings parameter is not used, and no spatial filters are provided. The default soap XML request body can be overridden to handle custom requirements.

Parameters:
Name Type Attributes Description
terria Terria

The Terria instance.

url String <optional>

The base URL from which to retrieve the data.

Extends

Members

(static) defaultPropertiesForSharing :Array.<String>

Source:

Gets or sets the default set of properties that are serialized when serializing a CatalogItem-derived for a share link.

Type:
  • Array.<String>

_memoizedInfoItemsSourceLookup

Source:
Inherited From:

Lookup table for _sourceInfoItemNames, access through CatalogMember#_infoItemsWithSourceInfoLookup

An :Array.<Date>

Source:
Inherited From:

Gets javascript dates describing the discrete datetimes (or intervals) available for this item. By declaring this as a knockout defined property, it is cached.

Type:
  • Array.<Date>

attribution :Credit

Source:
Inherited From:

Gets or sets an attribution displayed on the map when this catalog item is enabled. This property is observable.

Type:
  • Credit

cacheDuration :String

Source:
Inherited From:

Gets or sets the cache duration to use for proxied URLs for this catalog member. If undefined, proxied URLs are effectively cachable forever. The duration is expressed as a Varnish-like duration string, such as '1d' (one day) or '10000s' (ten thousand seconds).

Type:
  • String

canZoomTo :Boolean

Source:
Inherited From:

Returns true if this item currently has a rectangle to zoom to. Depends on observable properties, and so updates once loaded.

Type:
  • Boolean

clampedDiscreteTime :Date

Source:
Inherited From:

Gets the CatalogItems current time as the discrete time that the CatalogItem has information for. Returns the nearest time in-range if the clock is beyond the range of the intervals specified by the layer. Returns undefined if it is not possible to query the time (i.e. the item doesn't have a clock, availableDates or intervals).

See also discreteTime if you want the discrete time that is undefined if the current time is beyond the range of the intervals specified by the item.

Type:
  • Date

clock :DataSourceClock

Source:
Inherited From:

Gets or sets the clock parameters for this data item. If this property is undefined, this data item does not have any time-varying data. This property is observable.

Type:
  • DataSourceClock

colors :Array.<String>

Source:
Inherited From:

Gets or sets the array of color strings used for chart lines. TODO: make this customizable, eg. use colormap / colorPalette.

Type:
  • Array.<String>

currentTime :JulianDate

Source:
Inherited From:

Gets / sets the CatalogItems current time.

This property is an observable version of clock.currentTime, they will always have the same value.

When setting the currentTime through this property the correct clock (terria.clock or this.clock) is updated depending on whether .useOwnClock is true or false so that the catalog items state will reflect the new time correctly.

The get component of this property is effectively an interface adapter for clock.definitionChanged which changes the structure from an Event when the current time changes to a knockout property which can be observed.

Type:
  • JulianDate

customProperties :Object

Source:
Inherited From:

Gets or sets the dictionary of custom item properties. This property is observable.

Type:
  • Object

data :Blob|String|Promise

Source:
Inherited From:

Gets or sets the data, represented as a binary Blob, a string, or a Promise for one of those things. If this property is set, CatalogItem#url is ignored. This property is observable.

Type:
  • Blob | String | Promise

dataCustodian :String

Source:
Inherited From:

Gets or sets a description of the custodian of this data item. This property is an HTML string that must be sanitized before display to the user. This property is observable.

Type:
  • String

dataSource :DataSource

Source:
Overrides:

Gets the data source associated with this catalog item. Might be a TableDataSource or a GeoJsonDataSource.

Type:
  • DataSource

dataSourceUrl :String

Source:
Inherited From:

Gets or sets the URL from which the TableCatalogItem#data was obtained. This is informational; it is not used. This propery is observable.

Type:
  • String

dataUrl :String

Source:
Inherited From:

Gets or sets the URL from which this data item's raw data can be retrieved, or undefined if raw data for this data item is not available. This property is observable.

Type:
  • String

dataUrlType :String

Source:
Inherited From:

Gets or sets the type of the CatalogItem#dataUrl, or undefined if raw data for this data source is not available. This property is observable. Valid values are:

  • direct - A direct link to the data.
  • wfs - A Web Feature Service (WFS) base URL. If CatalogItem#dataUrl is not specified, the base URL will be this data item's URL.
  • wfs-complete - A complete, ready-to-use link to download features from a WFS server.
  • none - There is no data link.
Type:
  • String

dateFormat :Object

Source:
Inherited From:

Options for formatting current time and timeline tic labels. Options are: currentTime // Current time in time slider will be shown in this format. For example "mmmm yyyy" for Jan 2016. timelineTic // Timeline tics will have this label. For example "yyyy" will cause each tic to be labelled with the year.

Type:
  • Object

description :String

Source:
Inherited From:

Gets or sets the description of the item. This property is observable.

Type:
  • String

disablePreview

Source:
Inherited From:

Gets or sets a flag indicating whether the preview on the Add Data panel should be disabled. This is useful when the preview will be very slow to load.

discreteTime :Date

Source:
Inherited From:

Gets the CatalogItems current time as the discrete time that the CatalogItem has information for. Returns undefined if the clock is beyond the range of the intervals specified by the layer. Returns undefined if it is not possible to query the time (i.e. the item doesn't have a clock, availableDates or intervals).

See also clampedDiscreteTime if you want the discrete time that is clamped to the first / last value if the current time is beyond the range of the intervals specified by the item.

Type:
  • Date

displayChoicesBeforeLegend :Boolean

Source:
Inherited From:

Gets or sets a flag which determines whether the legend comes before (false) or after (true) the display variable choice. Default false.

Type:
  • Boolean

endDate :String

Source:

An end date in ISO8601 format. All requests filter to this end date. Set to undefined to use the current date.

Type:
  • String

featureInfoTemplate :String|Object

Source:
Inherited From:

Gets or sets a template to display message in a info box. May be a string or an object with template, name and/or partials properties.

Type:
  • String | Object

filterByProcedures

Source:
Default Value:
  • true

Whether to include the list of procedures in GetFeatureOfInterest calls, so that only locations that support those procedures are returned. For some servers (such as BoM's Water Data Online), this causes the request to time out.

forceProxy :Boolean

Source:
Inherited From:

Gets or sets whether or not this member should be forced to use a proxy. This property is not observable.

Type:
  • Boolean

hasDescription :Boolean

Source:
Inherited From:

Tests whether a description is available, either in the 'description' property or as a member of the 'info' array.

Type:
  • Boolean

hasLegend :Boolean

Source:
Inherited From:

Gets a value indicating whether this data item has a legend.

Type:
  • Boolean

hideSource :boolean

Source:
Inherited From:

Indicates that the source of this data should be hidden from the UI (obviously this isn't super-secure as you can just look at the network requests).

Type:
  • boolean

id :String

Source:
Inherited From:

An optional unique id for this member, that is stable across renames and moves. Use uniqueId to get the canonical unique id for this CatalogMember, which is present even if there is no id.

Type:
  • String

idColumns :Array.<String>

Source:
Inherited From:
Default Value:
  • undefined

Gets or sets the column identifiers (names or indices), so we can identify individual features within a table with a time column, or across multiple polled lat/lon files. Eg. ['lat', 'lon'] for immobile features, or ['identifier'] if a unique identifier is provided (where these are column names in the table; column numbers work as well). For region-mapped files, the region identifier is used instead. For non-spatial files, the x-column is used instead.

Type:
  • Array.<String>

imageryLayer :Object

Source:
Inherited From:

Gets the Cesium or Leaflet imagery layer object associated with this data source. Used in region mapping only. This property is undefined if the data source is not enabled.

Type:
  • Object

info :Array.<Object>

Source:
Inherited From:
Default Value:
  • []

Gets or sets the array of section titles and contents for display in the layer info panel. In future this may replace 'description' above - this list should not contain sections named 'description' or 'Description' if the 'description' property is also set as both will be displayed. The object is of the form {name:string, content:string}. Content will be rendered as Markdown with HTML. This property is observable.

Type:
  • Array.<Object>

infoSectionOrder :Array.<String>

Source:
Inherited From:

Gets or sets the array of section titles definining the display order of info sections. If this property is not defined, DataPreviewSections's DEFAULT_SECTION_ORDER is used. This property is observable.

Type:
  • Array.<String>

initialMessage :Object

Source:
Inherited From:

A message object that is presented to the user when an item or group is initially clicked The object is of the form {title:string, content:string, key: string, confirmation: boolean, confirmText: string, width: number, height: number}. This property is observable.

Type:
  • Object

initialObservablePropertyIndex :Number

Source:

Gets or sets the index of the initially selected observable property. Defaults to 0.

Type:
  • Number

initialProcedureIndex :Number

Source:

Gets or sets the index of the initially selected procedure. Defaults to 0.

Type:
  • Number

isEnabled :Boolean

Source:
Inherited From:

Gets or sets a value indicating whether this data item is enabled. An enabled data item appears in the "Now Viewing" pane, but is not necessarily shown on the map. This property is observable.

Type:
  • Boolean

isGroup :Boolean

Source:
Inherited From:

Gets a value that tells the UI whether this is a group. Groups, when clicked, expand to show their constituent items.

Type:
  • Boolean

isHidden :Boolean

Source:
Inherited From:
Default Value:
  • false

Gets or sets a value indicating whether this item is hidden from the catalog. This property is observable.

Type:
  • Boolean

isLegendVisible :Boolean

Source:
Inherited From:

Gets or sets a value indicating whether the legend for this data item is currently visible. This property is observable.

Type:
  • Boolean

isLoading :Boolean

Source:
Inherited From:

Gets or sets a value indicating whether this data source is currently loading. This property is observable.

Type:
  • Boolean

isMappable :Boolean

Source:
Inherited From:

Gets or sets a value indicating whether this data source can be shown on the map (as opposed to a time-series dataset, for instance, which can only be shown in a chart). This property is observable.

Type:
  • Boolean

isPromoted :Boolean

Source:
Inherited From:
Default Value:
  • false

Gets or sets a value indicating whether this item is kept above other non-promoted items. This property is observable.

Type:
  • Boolean

isSampled :Boolean

Source:
Inherited From:
Default Value:
  • true

Gets or sets a value indicating whether the rows correspond to "sampled" data. This only makes a difference if there is a time column and idColumns. In this case, if isSampled is true, then feature position, color and size are interpolated to produce smooth animation of the features over time. If isSampled is false, then times are treated as the start of periods, so that feature positions, color and size are kept constant from one time until the next, then change suddenly. Color and size are never interpolated when they are drawn from a text column.

Type:
  • Boolean

isShown :Boolean

Source:
Inherited From:

Gets or sets a value indicating whether this data item is currently shown on the map. In order to be shown, the item must also be enabled. This property is observable.

Type:
  • Boolean

isUserSupplied :Boolean

Source:
Inherited From:
Default Value:
  • true

Gets or sets a value indicating whether this member was supplied by the user rather than loaded from one of the Terria#initSources. User-supplied members must be serialized completely when, for example, serializing enabled members for sharing. This property is observable.

Type:
  • Boolean

isWaitingForDisclaimer :boolean

Source:
Inherited From:

Whether this catalog member is waiting for a disclaimer to be accepted before showing itself.

Type:
  • boolean

keepOnTop :Boolean

Source:
Inherited From:
Default Value:
  • false

Keeps the layer on top of all other imagery layers. This property is observable.

Type:
  • Boolean

legendUrl :LegendUrl

Source:
Inherited From:

Gets or sets the URL of the legend to show when this catalog item is enabled. If there is more than one legend URL, this property returns the first one.

Type:

legendUrls :LegendUrl

Source:
Inherited From:

Gets or sets the URLs of the legends to show when this catalog item is enabled.

Type:

maximumShownFeatureInfos :Number

Source:
Inherited From:

The maximum number of features whose information can be shown at one time in the Feature Info Panel, from this item. Defaults to terria.configParameters.defaultMaximumShownFeatureInfos

Type:
  • Number

metadata :Metadata

Source:
Inherited From:

Gets the metadata associated with this data item and the server that provided it, if applicable.

Type:

metadataUrl :String

Source:
Inherited From:

Gets or sets the URL from which this data item's metadata description can be retrieved, or undefined if metadata is not available for this data item. The format of the metadata depends on the type of data item. For example, Web Map Service (WMS) data items provide their metadata via their GetCapabilities document. This property is observable.

Type:
  • String

name :String

Source:
Inherited From:

Gets or sets the name of the item. This property is observable.

Type:
  • String

nameInCatalog :String

Source:
Inherited From:

Gets or sets the name of this catalog member in the catalog. By default this is just name, but can be overridden.

Type:
  • String

nowViewingMessage :String

Source:
Inherited From:

Gets or sets a message to show when this item is enabled for the first time in order to call attention to the Now Viewing panel.

Type:
  • String

observableProperties :Array.<Object>

Source:

Gets or sets the sensor observation service observableProperties that the user can choose from for this catalog item. An array of objects with keys 'identifier', 'title' and (optionally) 'defaultDuration' and 'units', eg. [{ identifier: 'http://bom.gov.au/waterdata/services/parameters/Storage Level', title: 'Storage Level', units: 'metres' }] The identifier is used for communication with the server, and the title is used for display to the user. If there is only one object, the user is not presented with a choice.

Type:
  • Array.<Object>

observablePropertiesName :String

Source:

Gets or sets the name seen by the user for the list of observable properties. Defaults to "Property", but eg. for BoM, "Observation type" would be better.

Type:
  • String

opacity :Number

Source:
Inherited From:
Default Value:
  • 0.8

Gets or sets the opacity (alpha) of the data item, where 0.0 is fully transparent and 1.0 is fully opaque. This property is observable.

Type:
  • Number

parent :CatalogGroup

Source:
Inherited From:

The parent CatalogGroup of this member.

Type:

path :String

Source:
Inherited From:

The complete path of this member's location.

Type:
  • String

polling :Polling

Source:
Inherited From:
Default Value:
  • undefined

Gets or sets polling information, such as the number of seconds between polls, and what url to poll.

Type:

procedures :Array.<Object>

Source:

Gets or sets the sensor observation service procedures that the user can choose from for this catalog item. An array of objects with keys 'identifier', 'title' and (optionally) 'defaultDuration' and 'units', eg. [{ identifier: 'http://bom.gov.au/waterdata/services/tstypes/Pat7_C_B_1_YearlyMean', title: 'Annual Mean', defaultDuration: '20y' // Final character must be s, h, d or y for seconds, hours, days or years. }] The identifier is used for communication with the server, and the title is used for display to the user. If there is only one object, the user is not presented with a choice.

Type:
  • Array.<Object>

proceduresName :String

Source:

Gets or sets the name seen by the user for the list of procedures. Defaults to "Procedure", but eg. for BoM, "Frequency" would be better.

Type:
  • String

propertiesForSharing :Array.<String>

Source:
Inherited From:

Gets the set of names of the properties to be serialized for this object for a share link.

Type:
  • Array.<String>

rectangle :Rectangle

Source:
Inherited From:

Gets or sets the geographic rectangle (extent or bounding box) containing this data item. This property is observable.

Type:
  • Rectangle

regionMapping :RegionMapping

Source:
Inherited From:

Gets the region mapping associated with this catalog item.

Type:

representAsGeoJson

Source:

A flag to choose between representing the underlying data as a TableStructure or as GeoJson. Geojson representation is not fully implemented - eg. currently only points are supported. Set to true for geojson. This can allow for non-point data (once the code is written). Set to false (the default) for table structure. This allows all the TableStyle options, and a better legend.

requestNumberLimit :Integer

Source:

Gets or sets the maximum number of GetObservation requests that we can fire off at a time. If the response size limit is 250, and this is 4, then observations for at most 1000 features will load. If there are more than 1000 features, they will be shown without observation data, until they are clicked.

Type:
  • Integer

requestSizeLimit :Integer

Source:

Gets or sets the maximum number of timeseries to request of the server in a single GetObservation request. Servers may have a Response Size Limit, eg. 250. Note the number of responses may be different to the number requested, eg. the BoM server can return > 1 timeseries/feature identifier, (such as ...stations/41001702), so it can be sensible to set this below the response size limit.

Type:
  • Integer

requestTemplate :String

Source:

Gets or sets the template XML string to POST to the SOS server to query for GetObservation. If this property is undefined, SensorObservationServiceCatalogItem.defaultRequestTemplate is used. This is used as a Mustache template. See SensorObservationServiceRequestTemplate.xml for the default. Be careful with newlines inside tags: Mustache can add an extra space in the front of them, which causes the request to fail on the SOS server. Eg. wsa:Action http://www.opengis.net/... </wsa:Action> will render as wsa:Action http://www.opengis.net/...</wsa:Action> The space before the "http" will cause the request to fail. This property is observable.

Type:
  • String

serializers :Object

Source:
Overrides:

Gets the set of functions used to serialize individual properties in CatalogMember#serializeToJson. When a property name on the model matches the name of a property in the serializers object lieral, the value will be called as a function and passed a reference to the model, a reference to the destination JSON object literal, and the name of the property.

Type:
  • Object

shareKeys :Array.<String>

Source:
Inherited From:

An array of all possible keys that can be used to match to this catalog member when specified in a share link - used for maintaining backwards compatibility when adding or changing CatalogMember#id.

Type:
  • Array.<String>

shortReport :String

Source:
Inherited From:

A short report to show on the now viewing tab. This property is observable.

Type:
  • String

shortReportSections :Array.<ShortReportSection>

Source:
Inherited From:

The list of collapsible sections of the short report. Each element of the array is an object literal with a name and content property.

Type:
  • Array.<ShortReportSection>

showFeaturesAtAllTimes

Source:

Gets or sets a flag for whether to display all features at all times, when tryToLoadObservationData is True. This can help the UX if the server returns some features starting in 1990 and some starting in 1995, so that the latter still appear (as grey points with no data) in 1990. It works by adding artificial rows to the table for each feature at the start and end of the total date range, if not already present. Set to false (the default) to only show points when they have data (including invalid data). Set to true to display points even at times that the server does not return them.

showsInfo :Boolean

Source:
Inherited From:

Gets or sets a value indicating whether this data source should show an info icon. This property is observable.

Type:
  • Boolean

showWarnings :Boolean

Source:
Inherited From:
Default Value:
  • true

Should any warnings like failures in region mapping be displayed to the user?

Type:
  • Boolean

splitDirection :ImagerySplitDirection

Source:
Inherited From:

Gets or sets which side of the splitter (if present) to display this imagery layer on. Defaults to both sides. Note that this only applies to region-mapped tables. This property is observable.

Type:
  • ImagerySplitDirection

startDate :String

Source:

A start date in ISO8601 format. All requests filter to this start date. Set to undefined for no temporal filter.

Type:
  • String

stationIdBlacklist

Source:

If set, an array of IDs. Only station IDs that don't match these will be included.

stationIdWhitelist

Source:

If set, an array of IDs. Only station IDs that match these will be included.

supportsOpacity :Boolean

Source:
Inherited From:

Gets a value indicating whether the opacity of this data item can be changed.

Type:
  • Boolean

supportsReordering :Boolean

Source:
Inherited From:

Gets a value indicating whether this data source, when enabled, can be reordered with respect to other data sources. Data sources that cannot be reordered are typically displayed above reorderable data sources.

Type:
  • Boolean

supportsSplitting

Source:
Inherited From:

Gets a value indicating whether this layer can be split so that it is only shown on the left or right side of the screen.

supportsToggleShown :Boolean

Source:
Inherited From:

Gets a value indicating whether the visibility of this data item can be toggled.

Type:
  • Boolean

tableStructure :TableStructure

Source:
Inherited From:

Gets the table structure associated with this catalog item.

Type:

terria :Terria

Source:
Inherited From:

Gets the Terria instance.

Type:

timeColumn :TableColumn

Source:
Inherited From:

Gets the active time column, if it exists.

Type:

tryToLoadObservationData :Boolean

Source:

Gets or sets a flag. If true, the catalog item will load all features, then, if number of features < requestSizeLimit * requestNumberLimit, it will load all the observation data for those features, and show that. If false, or there are too many features, the observation data is only loaded when the feature is clicked on (via a chart in the feature info panel). Defaults to true.

Type:
  • Boolean

type :String

Source:
Overrides:

Gets the type of data member represented by this instance.

Type:
  • String

typeName :String

Source:
Overrides:

Gets a human-readable name for this type of data source, 'GPX'.

Type:
  • String

uniqueId :String

Source:
Inherited From:

The canonical unique id for this CatalogMember. Will be the id property if one is present, otherwise it will fall back to the uniqueId of this item's parent + this item's name. This means that if no id is set anywhere up the tree, the uniqueId will be a complete path of this member's location.

Type:
  • String

updaters :Object

Source:
Inherited From:

Gets the set of functions used to update individual properties in CatalogMember#updateFromJson. When a property name in the returned object literal matches the name of a property on this instance, the value will be called as a function and passed a reference to this instance, a reference to the source JSON object literal, and the name of the property.

Type:
  • Object

url :String

Source:
Inherited From:

Gets or sets the URL of this data. This property is observable.

Type:
  • String

useOwnClock :Boolean

Source:
Inherited From:

Gets or sets a flag indicating whether imagery should be displayed using this item's own clock (currentTime, multiplier), or, if false, the terria clock (whose current time is shown in the timeline UI). Default false. This property is observable.

Type:
  • Boolean

xAxis :TableColumn

Source:
Inherited From:

Gets the x-axis column, if it exists (ie. if this is a chart).

Type:

zoomOnEnable :Boolean

Source:
Inherited From:
Default Value:
  • false

Gets or sets a value indicating whether the map will automatically zoom to this catalog item when it is enabled.

Note that within a single init source:

  • Catalog items with both isEnabled and zoomOnEnable set to true will override the top-level initialCamera property.
  • If multiple catalog items have both isEnabled and zoomOnEnable set to true, it is undefined which one will affect the camera.

In the case of multiple init sources, however, the camera will reflect whatever happens in the last init source, whether it is a result of a zoomOnEnable or an initialCamera,

Type:
  • Boolean

Methods

(protected) _disable()

Source:
Overrides:

Disables this data item on the globe or map. This method:

  • Should not be called directly. Instead, set the CatalogItem#isEnabled property to false.
  • Will not be called if CatalogItem#_enable was not called (for example, because the previous call was deferred while the data item loaded, and the user disabled the data item before the load completed).
  • Will only be called after CatalogItem#_hide when a shown data item is disabled.
  • Calls CatalogItem#_disableInCesium or CatalogItem#_disableInLeaflet in the base-class implementation, depending on which viewer is active. Derived classes that have identical disable logic for both viewers may override this method instead of the viewer-specific ones.

(abstract, protected) _disableInCesium()

Source:
Inherited From:

When implemented in a derived class, disables this data item on the Cesium globe. You should not call this directly, but instead set the CatalogItem#isEnabled property to false. See CatalogItem#_disable for more information.

(abstract, protected) _disableInLeaflet()

Source:
Inherited From:

When implemented in a derived class, disables this data item on the Leaflet map. You should not call this directly, but instead set the CatalogItem#isEnabled property to false. See CatalogItem#_disable for more information.

(protected) _enable()

Source:
Overrides:

Enables this data item on the globe or map. This method:

(abstract, protected) _enableInCesium()

Source:
Inherited From:

When implemented in a derived class, enables this data item on the Cesium globe. You should not call this directly, but instead set the CatalogItem#isEnabled property to true. See CatalogItem#_enable for more information.

(abstract, protected) _enableInLeaflet()

Source:
Inherited From:

When implemented in a derived class, enables this data item on the Leaflet map. You should not call this directly, but instead set the CatalogItem#isEnabled property to true. See CatalogItem#_enable for more information.

(protected) _getValuesThatInfluenceLoad() → {Array}

Source:
Overrides:

When implemented in a derived class, gets an array containing the current value of all properties that influence this item's load process. See CatalogItem#load for more information on when and how this is used. The base class implementation returns an empty array.

Returns:

The array of values that influence the load process.

Type
Array

(protected) _hide()

Source:
Overrides:

Hides this data item on the globe or map. This method:

  • Should not be called directly. Instead, set the CatalogItem#isShown property to false.
  • Will not be called if CatalogItem#_show was not called (for example, because the previous call was deferred while the data item loaded, and the user hid the data item before the load completed).
  • Calls CatalogItem#_hideInCesium or CatalogItem#_hideInLeaflet in the base-class implementation, depending on which viewer is active. Derived classes that have identical hide logic for both viewers may override this method instead of the viewer-specific ones.

(abstract, protected) _hideInCesium()

Source:
Inherited From:

When implemented in a derived class, hides this data item on the Cesium globe. You should not call this directly, but instead set the CatalogItem#isShown property to false. See CatalogItem#_hide for more information.

(abstract, protected) _hideInLeaflet()

Source:
Inherited From:

When implemented in a derived class, hides this data item on the Leaflet map. You should not call this directly, but instead set the CatalogItem#isShown property to false. See CatalogItem#_hide for more information.

_load() → {Promise}

Source:
Overrides:

Your derived class must implement _load.

Returns:

A promise that resolves when the load is complete, or undefined if the function is already loaded.

Type
Promise

(protected) _show()

Source:
Overrides:

Shows this data item on the globe or map. This method:

(abstract, protected) _showInCesium()

Source:
Inherited From:

When implemented in a derived class, shows this data item on the Cesium globe. You should not call this directly, but instead set the CatalogItem#isShown property to true. See CatalogItem#_show for more information.

(abstract, protected) _showInLeaflet()

Source:
Inherited From:

When implemented in a derived class, shows this data item on the Leaflet map. You should not call this directly, but instead set the CatalogItem#isShown property to true. See CatalogItem#_show for more information.

activateColumnFromTableStyle()

Source:
Inherited From:

Activates the column specified in the table style's "dataVariable" parameter, if any. If columns are specified, those active statuses will take precedence

applyTableStyleColumnsToStructure(tableStyle, tableStructure)

Source:
Inherited From:

Updates tableStructure for the tableStyle, by looking at tableStyle.columns and applying units, type, active and name. If the data was loaded from a csv file, CsvCatalogItem's loadTableFromCsv will already have taken care of this. This function is needed if the data came directly from a TableStructure.

Parameters:
Name Type Description
tableStyle TableStyle

The table style.

tableStructure TableStructure

The table structure to update.

chartData() → {ChartData}

Source:
Inherited From:

Returns a ChartData object for the TableCatalogItem. See ChartPanel.jsx for an example. Maps each scalar Y column onto a separate ChartData data series.

Returns:
Type
ChartData

connectsWithRoot()

Source:
Inherited From:

Goes up the hierarchy and determines if this CatalogMember is connected with the root in terria.catalog, or whether it's part of a disconnected sub-tree.

enableWithParents()

Source:
Inherited From:

"Enables" this catalog member in a way that makes sense for its implementation (e.g. isEnabled for items, isOpen for groups, and all its parents and ancestors in the tree.

findInfoSection(sectionName) → {Object}

Source:
Inherited From:

Finds an CatalogMember#info section by name.

Parameters:
Name Type Description
sectionName String

The name of the section to find.

Returns:

The section, or undefined if no section with that name exists.

Type
Object

getNextColor() → {String}

Source:
Inherited From:

Finds the next unused color for a chart line.

Returns:

A string description of the color.

Type
String

handleTileError(detailsRequestPromise, imageryProvider, x, y, level) → {Promise}

Source:
Inherited From:

Handles an error in loading a tile. If this function returns a promise that resolves successfully, the tile request will be retried. If the returned promise rejects, it must reject with an instance of RequestErrorEvent with the details of the failure, and the default handling of tile failures will be used. The default handling takes into account the treat404AsError, treat403AsError, and ignoreUnknownTileErrors properties. The default implementation simply returns detailsRequestPromise.

Parameters:
Name Type Description
detailsRequestPromise Promise

A promise which is the result of a simple call to loadWithXhr for the URL that failed. If it resolves, it will resolve to the successfully-download content of the tile URL, as text. If it rejects, it will reject with a RequestErrorEvent.

imageryProvider ImageryProvider

The imagery provider that generated the failed request.

x Number

The x coordinate of the failed tile.

y Number

The y coordinate of the failed tile.

level Number

The level of the failed tile.

Returns:

A promise, as described above.

Type
Promise

initializeFromTableStructure(tableStructure) → {Promise}

Source:
Inherited From:

Given a TableStructure, determine what sort of table it is. Prepare:

  • TableDataSource if it has latitude and longitude
  • RegionMapping if it has a region column
  • nothing for non-geospatial data (just use the TableStructure directly).
Parameters:
Name Type Description
tableStructure TableStructure
Returns:

Returns a promise that resolves to true if it is a recognised format.

Type
Promise

isNextTimeAvaliable() → {Boolean}

Source:
Inherited From:

Whether it is possible to move to a time interval after the current time.

Returns:

True if it is possible.

Type
Boolean

isPreviousTimeAvaliable() → {Boolean}

Source:
Inherited From:

Whether it is possible to move to a time interval before the current time.

Returns:

True if it is possible.

Type
Boolean

load() → {Promise}

Source:
Inherited From:

Loads this catalog item, if it's not already loaded. It is safe to call this method multiple times. The CatalogItem#isLoading flag will be set while the load is in progress. Derived classes should implement CatalogItem#_load to perform the actual loading for the item. Derived classes may optionally implement CatalogItem#_getValuesThatInfluenceLoad to provide an array containing the current value of all properties that influence this item's load process. Each time that CatalogItem#load is invoked, these values are checked against the list of values returned last time, and CatalogItem#_load is invoked again if they are different. If CatalogItem#_getValuesThatInfluenceLoad is undefined or returns an empty array, CatalogItem#_load will only be invoked once, no matter how many times CatalogItem#load is invoked.

Returns:

A promise that resolves when the load is complete, or undefined if the item is already loaded.

Type
Promise

loadAndEnable() → {Promise}

Source:
Inherited From:

Enables this catalog item, and returns a promise that resolves when the load process, if any, completes.

Returns:

The promise.

Type
Promise

loadIntoTableStructure(featureOfInterestIdentifiers, options) → {Promise}

Source:

Returns a promise to a table structure of sensor observation data, given one/multiple featureOfInterest identifiers. Uses the currently active concepts to determine the procedure and observedProperty filter. Then batches GetObservation requests to actually fetch the values for that procedure and property at that site(s). This is required by Chart.jsx for any non-csv format (which passes the chart's source url as the sole argument.)

Parameters:
Name Type Description
featureOfInterestIdentifiers String | Array.<String>

The featureOfInterest identifier, or array thereof.

options Object

Object with the following properties:

Properties
Name Type Attributes Description
procedure Object <optional>

An object overriding the selected procedure, for instance from chart generated items being regenerated.

Returns:

A promise which resolves to a TableStructure.

Type
Promise

moveToNextTime()

Source:
Inherited From:

Move the current time to the next time interval.

moveToPreviousTime()

Source:
Inherited From:

Move the current time to the previous time interval.

serializeToJson(optionsopt) → {Object}

Source:
Inherited From:

Serializes the data item to JSON.

Parameters:
Name Type Attributes Description
options Object <optional>

Object with the following properties:

Properties
Name Type Attributes Description
propertyFilter function <optional>

Filter function that will be executed to determine whether a property should be serialized.

itemFilter function <optional>

Filter function that will be executed for each item in a group to determine whether that item should be serialized.

Returns:

The serialized JSON object-literal.

Type
Object

setColorOnActiveColumns()

Source:
Inherited From:

Set the color (for charts) on the active columns. Assumes the table's getColorCallback has been set.

startPolling()

Source:
Inherited From:

Your derived class should implement its own version of startPolling, if it is allowed. No return value.

syncActiveColumns(tableStyle, tableStructure)

Source:
Inherited From:

Updates tableStyle with a given tableStructure This is needed if the UI toggles concepts via Concept.jsx

Parameters:
Name Type Description
tableStyle TableStyle

The table style.

tableStructure TableStructure

The table structure to update.

syncAllVariablesUnactiveOnUpdate()

Source:
Inherited From:

Ensures tableStructure active state reflects updateFromJson updates

toggleEnabled() → {Boolean}

Source:
Inherited From:

Toggles the CatalogItem#isEnabled property of this item. If it is enabled, calling this method will disable it. If it is disabled, calling this method will enable it.

Returns:

true if the item is now enabled, false if it is now disabled.

Type
Boolean

toggleLegendVisible() → {Boolean}

Source:
Inherited From:

Toggles the CatalogItem#isLegendVisible property of this item. If it is visible, calling this method will hide it. If it is hidden, calling this method will make it visible.

Returns:

true if the legend is now visible, false if it is now hidden.

Type
Boolean

toggleShown() → {Boolean}

Source:
Inherited From:

Toggles the CatalogItem#isShown property of this item. If it is shown, calling this method will hide it. If it is hidden, calling this method will show it.

Returns:

true if the item is now shown, false if it is now hidden.

Type
Boolean

updateFromJson(json, optionsopt) → {Promise}

Source:
Inherited From:

Updates the catalog member from a JSON object-literal description of it. Existing collections with the same name as a collection in the JSON description are updated. If the description contains a collection with a name that does not yet exist, it is created. Because parts of the update may happen asynchronously, this method returns at Promise that will resolve when the update is completely done.

Parameters:
Name Type Attributes Description
json Object

The JSON description. The JSON should be in the form of an object literal, not a string.

options Object <optional>

Object with the following properties:

Properties
Name Type Attributes Description
onlyUpdateExistingItems Boolean <optional>

true to only update existing items and never create new ones, or false is new items may be created by this update.

isUserSupplied Boolean <optional>

If specified, sets the CatalogMember#isUserSupplied property of updated catalog members to the given value. If not specified, the property is left unchanged.

Returns:

A promise that resolves when the update is complete.

Type
Promise

useClock() → {Promise}

Source:
Inherited From:

Uses the CatalogItem#clock settings from this data item. If this data item has no clock settings, or has the useOwnClock property true, this method does nothing. Because the clock update may happen asynchronously (for example, if the item's clock parameters are not yet known), this method returns a Promise that resolves when the clock has been updated.

Returns:

A promise that resolves when the clock has been updated.

Type
Promise

zoomTo() → {Promise}

Source:
Inherited From:

Moves the camera so that the item's bounding rectangle is visible. If CatalogItem#rectangle is undefined or covers more than about half the world in the longitude direction, or if the data item is not enabled or not shown, this method does nothing. Because the zoom may happen asynchronously (for example, if the item's rectangle is not yet known), this method returns a Promise that resolves when the zoom animation starts.

Returns:

A promise that resolves when the zoom animation starts.

Type
Promise

zoomToAndUseClock() → {Promise}

Source:
Inherited From:

Moves the camera so that the data item's bounding rectangle is visible, and updates the TerriaJS clock according to this data item's clock settings. This method simply calls CatalogItem#zoomTo and CatalogItem#useClock. Because the zoom and clock update may happen asynchronously (for example, if the item's rectangle is not yet known), this method returns a Promise that resolves when the zoom animation starts and the clock has been updated.

Returns:

A promise that resolves when the clock has been updated and the zoom animation has started.

Type
Promise