new UrlTemplateCatalogItem(terria)
- Source:
A ImageryLayerCatalogItem
representing a layer from a mapping server that can be reached
via a URL template.
Parameters:
Name | Type | Description |
---|---|---|
terria |
Terria | The Terria instance. |
Extends
Members
_memoizedInfoItemsSourceLookup
- Source:
- Inherited From:
Lookup table for _sourceInfoItemNames, access through CatalogMember#_infoItemsWithSourceInfoLookup
attribution :String
- Source:
- Overrides:
Gets or sets the attribution to display with the data This property is observable.
Type:
- String
availableDates :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>
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
canFilterIntervalsByFeature :Boolean
- Source:
- Inherited From:
Gets a value indicating whether this catalog item can filter its
ImageryLayerCatalogItem#intervals
by feature.
Type:
- Boolean
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
chartColor :String
- Source:
- Inherited From:
- Default Value:
- '#44C99F'
Gets or sets the color of how the dataset will displayed on the chart
Type:
- String
chartType :String
- Source:
- Inherited From:
- Default Value:
- 'moment'
Gets or sets the name style of how the item will be rendered on the chart
Type:
- String
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
clipToRectangle :Boolean
- Source:
- Inherited From:
- Default Value:
- false
Gets or sets a value indicating whether this dataset should be clipped to the CatalogItem#rectangle
.
If true, no part of the dataset will be displayed outside the rectangle. This property is true by default,
leading to better performance and avoiding tile request errors that might occur when requesting tiles outside the
server-specified rectangle. However, it may also cause features to be cut off in some cases, such as if a server
reports an extent that does not take into account that the representation of features sometimes require a larger
spatial extent than the features themselves. For example, if a point feature on the edge of the extent is drawn
as a circle with a radius of 5 pixels, half of that circle will be cut off.
Type:
- Boolean
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
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
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
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. IfCatalogItem#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
dontChartAlone :Boolean
- Source:
- Inherited From:
- Default Value:
- false
Whether this layer is sufficient to warrant a chart.
Type:
- Boolean
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
featureTimesProperty :String
- Source:
- Inherited From:
Gets or sets the name of a property in a feature returned from this layer's feature query service that indicates the times at which this layer covers this position. For example, historical and near-real-time satellite imagery often comes as daily swaths, with a given area on the globe potentially only covered every number of days.
Type:
- String
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
ignoreUnknownTileErrors :Boolean
- Source:
- Inherited From:
- Default Value:
- false
Gets or sets a value indicating whether non-specific (no HTTP status code) tile errors should be ignored. This is a last resort, for dealing with odd cases such as data sources that return non-images (eg XML) with a 200 status code. No error messages will be shown to the user.
Type:
- Boolean
imageryLayer :Object
- Source:
- Inherited From:
Gets the Cesium or Leaflet imagery layer object associated with this data source. 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
initialTimeSource :String
- Source:
- Inherited From:
Options for the value of the animation timeline at start. Valid options in config file are: initialTimeSource: "present" // closest to today's date initialTimeSource: "start" // start of time range of animation initialTimeSource: "end" // end of time range of animation initialTimeSource: An ISO8601 date e.g. "2015-08-08" // specified date or nearest if date is outside range
Type:
- String
intervals :TimeIntervalCollection
- Source:
- Inherited From:
- Default Value:
- undefined
Gets or sets the TimeIntervalCollection
defining the intervals of distinct imagery. If this catalog item
is not time-dynamic, property is undefined. This property is observable.
Type:
- TimeIntervalCollection
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
isRequiredForRendering :Boolean
- Source:
- Inherited From:
- Default Value:
- false
Gets or sets a value indicating whether tiles of this catalog item are required to be loaded before terrain tiles to which they're attached can be rendered. This should usually be set to true for base layers and false for all others.
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
layerTitles :Array.<String>
- Source:
- Inherited From:
Gets the title of each of the layers in WebMapServiceCatalogItem#layers
. If the layer
titles are not yet known (because GetCapabilities has not been loaded yet, for example), this
property will return undefined.
Type:
- Array.<String>
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:
maximumLevel :String
- Source:
Gets or sets the maximum tile level to retrieve from the map data This property is observable.
Type:
- String
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
minimumLevel :String
- Source:
Gets or sets the minimum tile level to retrieve from the map data 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
opacity :Number
- Source:
- Inherited From:
- Default Value:
- 0.6
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
propertiesForSharing :Array.<String>
- Source:
- Overrides:
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
serializers :Object
- Source:
- Inherited From:
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 literal,
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>
showOnChart :Boolean
- Source:
- Inherited From:
- Default Value:
- false
Whether to show imagery availability on charts.
Type:
- Boolean
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
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. This property is observable.
Type:
- ImagerySplitDirection
subdomains :Array
- Source:
Gets or sets the array of subdomains, one of which will be prepended to each tile URL. This property is observable.
Type:
- Array
supportsDeltaComparison
- Source:
- Inherited From:
Gets or sets a flag indicating whether this source supports comparison of imagery from two different times.
supportsOpacity :Boolean
- Source:
- Overrides:
Gets a value indicating whether the opacity of this data source 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
terria :Terria
- Source:
- Inherited From:
Gets the Terria instance.
Type:
tileDiscardPolicy :TileDiscardPolicy
- Source:
Gets or sets the tile discard policy.
Type:
- TileDiscardPolicy
tileErrorThresholdBeforeDisabling :Number
- Source:
- Inherited From:
- Default Value:
- 5
Allow a threshold to be configured for the number of tile fails before disabling the layer.
Type:
- Number
treat403AsError :Boolean
- Source:
- Inherited From:
- Default Value:
- false
Gets or sets a value indicating whether a 403 response code when requesting a tile should be treated as an error. If false, 403s are assumed to just be missing tiles and need not be reported to the user.
Type:
- Boolean
treat404AsError :Boolean
- Source:
- Inherited From:
- Default Value:
- false
Gets or sets a value indicating whether a 404 response code when requesting a tile should be treated as an error. If false, 404s are assumed to just be missing tiles and need not be reported to the user.
Type:
- Boolean
type :String
- Source:
- Overrides:
Gets the type of data item represented by this instance.
Type:
- String
type :String
- Source:
- Overrides:
Gets the type of data item represented by this instance.
Type:
- String
typeName :String
- Source:
- Overrides:
Gets a human-readable name for this type of data source, 'Cesium Ion Imagery'.
Type:
- String
typeName :String
- Source:
- Overrides:
Gets a human-readable name for this type of data source, 'URL Template Map Server'.
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
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
andzoomOnEnable
set to true will override the top-levelinitialCamera
property. - If multiple catalog items have both
isEnabled
andzoomOnEnable
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
(abstract, protected) _createImageryProvider(timeopt) → {ImageryProvider}
- Source:
- Overrides:
When implemented in a derived class, creates the ImageryProvider
for this catalog item.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
time |
ImageryLayerTime |
<optional> |
The time for which to create an imagery provider. In layers that are not time-dynamic, this parameter is ignored. |
Returns:
The created imagery provider.
- Type
- ImageryProvider
(protected) _disable()
- Source:
- Inherited From:
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
orCatalogItem#_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:
- Inherited From:
Enables this data item on the globe or map. This method:
- Should not be called directly. Instead, set the
CatalogItem#isEnabled
property to true. - Will not necessarily be called immediately when
CatalogItem#isEnabled
is set to true; it will be deferred untilCatalogItem#isLoading
is false. - Should NOT also show the data item on the globe/map (see
CatalogItem#_show
), so in some cases it may not do anything at all. - Calls
CatalogItem#_enableInCesium
orCatalogItem#_enableInLeaflet
in the base-class implementation, depending on which viewer is active. Derived classes that have identical enable logic for both viewers may override this method instead of the viewer-specific ones.
(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:
- Inherited From:
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:
- Inherited From:
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
orCatalogItem#_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.
(protected) _load() → {Promise}
- Source:
- Inherited From:
When implemented in a derived class, this method loads the item. The base class implementation does nothing.
This method should not be called directly; call CatalogItem#load
instead.
Returns:
A promise that resolves when the load is complete.
- Type
- Promise
(protected) _show()
- Source:
- Inherited From:
Shows this data item on the globe or map. This method:
- Should not be called directly. Instead, set the
CatalogItem#isShown
property to true. - Will only be called after
CatalogItem#_enable
; you can count on that method having been called first. - Will not necessarily be called immediately when
CatalogItem#isShown
is set to true; it will be deferred untilCatalogItem#isLoading
is false. - Calls
CatalogItem#_showInCesium
orCatalogItem#_showInLeaflet
in the base-class implementation, depending on which viewer is active. Derived classes that have identical show logic for both viewers may override this method instead of the viewer-specific ones.
(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.
chartData()
- Source:
- Inherited From:
Return the imagery availability dates as a data series for charting.
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.
createImageryProvider(timeopt) → {ImageryProvider}
- Source:
- Inherited From:
Creates the ImageryProvider
for this catalog item.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
time |
ImageryLayerTime |
<optional> |
The time for which to create an imagery provider. In layers that are not time-dynamic, this parameter is ignored. |
Returns:
The created imagery provider.
- Type
- ImageryProvider
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.
filterIntervalsByFeature(feature)
- Source:
- Inherited From:
Filters this layers ImageryLayerCatalogItem#intervals
according to availability at a location
determined by a feature.
Parameters:
Name | Type | Description |
---|---|---|
feature |
Feature | The feature to use to filter. |
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
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 |
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
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
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.
refresh()
- Source:
- Inherited From:
Refreshes this layer on the map. This is useful when, for example, parameters that went into
ImageryLayerCatalogItem#_createImageryProvider
change.
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
|
Returns:
The serialized JSON object-literal.
- Type
- Object
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
|
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