GlobeOrMap

GlobeOrMap

new GlobeOrMap(terria, disclaimerClass)

Source:
See:

The base class for map/globe viewers.

Parameters:
Name Type Description
terria Terria

The Terria instance.

disclaimerClass String

Class of a disclaimer element that should be shifted upwards to make room for other ui elements.

Members

canShowSplitter :Boolean

Source:

Gets or sets whether this viewer can show a splitter. Default false.

Type:
  • Boolean

terria :Terria

Source:

Gets or sets the Terria instance.

Type:

Methods

(protected) _createFeatureFromImageryLayerFeature(imageryFeature) → {Feature}

Source:

Creates a {@see Feature} (based on an {@see Entity}) from a {@see ImageryLayerFeatureInfo}.

Parameters:
Name Type Description
imageryFeature ImageryLayerFeatureInfo

The imagery layer feature for which to create an entity-based feature.

Returns:

The created feature.

Type
Feature

addAttribution(attribution)

Source:

Adds an attribution to the globe or map.

Parameters:
Name Type Description
attribution Credit

The attribution to add.

addAttribution(attribution)

Source:

Adds an attribution to the globe or map.

Parameters:
Name Type Description
attribution Credit

The attribution to add.

captureScreenshot() → {Promise.<string>}

Source:

Captures a screenshot of the map.

Returns:

A promise that resolves to a data URL when the screenshot is ready.

Type
Promise.<string>

captureScreenshot() → {Promise}

Source:

Captures a screenshot of the map.

Returns:

A promise that resolves to a data URL when the screenshot is ready.

Type
Promise

computePositionOnScreen(position, resultopt) → {Cartesian2}

Source:

Computes the screen position of a given world position.

Parameters:
Name Type Attributes Description
position Cartesian3

The world position in Earth-centered Fixed coordinates.

result Cartesian2 <optional>

The instance to which to copy the result.

Returns:

The screen position, or undefined if the position is not on the screen.

Type
Cartesian2

computePositionOnScreen(position, resultopt) → {Cartesian2}

Source:

Computes the screen position of a given world position.

Parameters:
Name Type Attributes Description
position Cartesian3

The world position in Earth-centered Fixed coordinates.

result Cartesian2 <optional>

The instance to which to copy the result.

Returns:

The screen position, or undefined if the position is not on the screen.

Type
Cartesian2

getAllAttribution() → {Array.<String>}

Source:

Gets all attribution currently active on the globe or map.

Returns:

The list of current attributions, as HTML strings.

Type
Array.<String>

getContainer() → {Element}

Source:

Gets the current container element.

Returns:

The current container element.

Type
Element

getContainer() → {Element}

Source:

Gets the current container element.

Returns:

The current container element.

Type
Element

getCurrentExtent() → {Rectangle}

Source:

Gets the current extent of the camera. This may be approximate if the viewer does not have a strictly rectangular view.

Returns:

The current visible extent.

Type
Rectangle

getCurrentExtent() → {Rectangle}

Source:

Gets the current extent of the camera. This may be approximate if the viewer does not have a strictly rectangular view.

Returns:

The current visible extent.

Type
Rectangle

lower(index)

Source:

Lower an item's level in the viewer This does not check that index is valid

Parameters:
Name Type Description
index Number

The index of the item to lower

lower(index)

Source:

Lower an item's level in the viewer This does not check that index is valid

Parameters:
Name Type Description
index Number

The index of the item to lower

lowerToBottom(item)

Source:

Lowers this imagery layer to the bottom, underneath all other layers. If this item is not enabled or not shown, this method does nothing.

Parameters:
Name Type Description
item CatalogItem

The item to lower to the bottom (usually a basemap)

lowerToBottom(item)

Source:

Lowers this imagery layer to the bottom, underneath all other layers. If this item is not enabled or not shown, this method does nothing.

Parameters:
Name Type Description
item CatalogItem

The item to lower to the bottom (usually a basemap)

notifyRepaintRequired()

Source:

Notifies the viewer that a repaint is required.

notifyRepaintRequired()

Source:

Notifies the viewer that a repaint is required.

pickFromLocation(latlng, imageryLayerCoords, existingFeatures)

Source:

Picks features based off a latitude, longitude and (optionally) height.

Parameters:
Name Type Description
latlng Object

The position on the earth to pick.

imageryLayerCoords Object

A map of imagery provider urls to the coords used to get features for those imagery providers - i.e. x, y, level

existingFeatures

An optional list of existing features to concatenate the ones found from asynchronous picking to.

raise(index)

Source:

Raise an item's level in the viewer This does not check that index is valid

Parameters:
Name Type Description
index Number

The index of the item to raise

raise(index)

Source:

Raise an item's level in the viewer This does not check that index is valid

Parameters:
Name Type Description
index Number

The index of the item to raise

removeAttribution(attribution)

Source:

Removes an attribution from the globe or map.

Parameters:
Name Type Description
attribution Credit

The attribution to remove.

removeAttribution(attribution)

Source:

Removes an attribution from the globe or map.

Parameters:
Name Type Description
attribution Credit

The attribution to remove.

updateLayerOrderAfterReorder()

Source:

Perform any updates to the order of layers required by raise and lower, but after the items have been reordered. This allows for the possibility that raise and lower do nothing, and instead we call updateLayerOrder

updateLayerOrderAfterReorder()

Source:

Perform any updates to the order of layers required by raise and lower, but after the items have been reordered. This allows for the possibility that raise and lower do nothing, and instead we call updateLayerOrder

zoomTo(viewOrExtent, flightDurationSecondsopt)

Source:

Zooms to a specified camera view or extent with a smooth flight animation.

Parameters:
Name Type Attributes Default Description
viewOrExtent CameraView | Rectangle

The view or extent to which to zoom.

flightDurationSeconds Number <optional>
3.0

The length of the flight animation in seconds.

zoomTo(viewOrExtent, flightDurationSecondsopt)

Source:

Zooms to a specified camera view or extent with a smooth flight animation.

Parameters:
Name Type Attributes Default Description
viewOrExtent CameraView | Rectangle

The view or extent to which to zoom.

flightDurationSeconds Number <optional>
3.0

The length of the flight animation in seconds.

GlobeOrMap

new GlobeOrMap()

Source:
See:

The base class for map/globe viewers.

Members

canShowSplitter :Boolean

Source:

Gets or sets whether this viewer can show a splitter. Default false.

Type:
  • Boolean

terria :Terria

Source:

Gets or sets the Terria instance.

Type:

Methods

(protected) _createFeatureFromImageryLayerFeature(imageryFeature) → {Feature}

Source:

Creates a {@see Feature} (based on an {@see Entity}) from a {@see ImageryLayerFeatureInfo}.

Parameters:
Name Type Description
imageryFeature ImageryLayerFeatureInfo

The imagery layer feature for which to create an entity-based feature.

Returns:

The created feature.

Type
Feature

addAttribution(attribution)

Source:

Adds an attribution to the globe or map.

Parameters:
Name Type Description
attribution Credit

The attribution to add.

addAttribution(attribution)

Source:

Adds an attribution to the globe or map.

Parameters:
Name Type Description
attribution Credit

The attribution to add.

captureScreenshot() → {Promise.<string>}

Source:

Captures a screenshot of the map.

Returns:

A promise that resolves to a data URL when the screenshot is ready.

Type
Promise.<string>

captureScreenshot() → {Promise}

Source:

Captures a screenshot of the map.

Returns:

A promise that resolves to a data URL when the screenshot is ready.

Type
Promise

computePositionOnScreen(position, resultopt) → {Cartesian2}

Source:

Computes the screen position of a given world position.

Parameters:
Name Type Attributes Description
position Cartesian3

The world position in Earth-centered Fixed coordinates.

result Cartesian2 <optional>

The instance to which to copy the result.

Returns:

The screen position, or undefined if the position is not on the screen.

Type
Cartesian2

computePositionOnScreen(position, resultopt) → {Cartesian2}

Source:

Computes the screen position of a given world position.

Parameters:
Name Type Attributes Description
position Cartesian3

The world position in Earth-centered Fixed coordinates.

result Cartesian2 <optional>

The instance to which to copy the result.

Returns:

The screen position, or undefined if the position is not on the screen.

Type
Cartesian2

getAllAttribution() → {Array.<String>}

Source:

Gets all attribution currently active on the globe or map.

Returns:

The list of current attributions, as HTML strings.

Type
Array.<String>

getContainer() → {Element}

Source:

Gets the current container element.

Returns:

The current container element.

Type
Element

getContainer() → {Element}

Source:

Gets the current container element.

Returns:

The current container element.

Type
Element

getCurrentExtent() → {Rectangle}

Source:

Gets the current extent of the camera. This may be approximate if the viewer does not have a strictly rectangular view.

Returns:

The current visible extent.

Type
Rectangle

getCurrentExtent() → {Rectangle}

Source:

Gets the current extent of the camera. This may be approximate if the viewer does not have a strictly rectangular view.

Returns:

The current visible extent.

Type
Rectangle

lower(index)

Source:

Lower an item's level in the viewer This does not check that index is valid

Parameters:
Name Type Description
index Number

The index of the item to lower

lower(index)

Source:

Lower an item's level in the viewer This does not check that index is valid

Parameters:
Name Type Description
index Number

The index of the item to lower

lowerToBottom(item)

Source:

Lowers this imagery layer to the bottom, underneath all other layers. If this item is not enabled or not shown, this method does nothing.

Parameters:
Name Type Description
item CatalogItem

The item to lower to the bottom (usually a basemap)

lowerToBottom(item)

Source:

Lowers this imagery layer to the bottom, underneath all other layers. If this item is not enabled or not shown, this method does nothing.

Parameters:
Name Type Description
item CatalogItem

The item to lower to the bottom (usually a basemap)

notifyRepaintRequired()

Source:

Notifies the viewer that a repaint is required.

notifyRepaintRequired()

Source:

Notifies the viewer that a repaint is required.

pickFromLocation(latlng, imageryLayerCoords, existingFeatures)

Source:

Picks features based off a latitude, longitude and (optionally) height.

Parameters:
Name Type Description
latlng Object

The position on the earth to pick.

imageryLayerCoords Object

A map of imagery provider urls to the coords used to get features for those imagery providers - i.e. x, y, level

existingFeatures

An optional list of existing features to concatenate the ones found from asynchronous picking to.

raise(index)

Source:

Raise an item's level in the viewer This does not check that index is valid

Parameters:
Name Type Description
index Number

The index of the item to raise

raise(index)

Source:

Raise an item's level in the viewer This does not check that index is valid

Parameters:
Name Type Description
index Number

The index of the item to raise

removeAttribution(attribution)

Source:

Removes an attribution from the globe or map.

Parameters:
Name Type Description
attribution Credit

The attribution to remove.

removeAttribution(attribution)

Source:

Removes an attribution from the globe or map.

Parameters:
Name Type Description
attribution Credit

The attribution to remove.

updateLayerOrderAfterReorder()

Source:

Perform any updates to the order of layers required by raise and lower, but after the items have been reordered. This allows for the possibility that raise and lower do nothing, and instead we call updateLayerOrder

updateLayerOrderAfterReorder()

Source:

Perform any updates to the order of layers required by raise and lower, but after the items have been reordered. This allows for the possibility that raise and lower do nothing, and instead we call updateLayerOrder

zoomTo(viewOrExtent, flightDurationSecondsopt)

Source:

Zooms to a specified camera view or extent with a smooth flight animation.

Parameters:
Name Type Attributes Default Description
viewOrExtent CameraView | Rectangle

The view or extent to which to zoom.

flightDurationSeconds Number <optional>
3.0

The length of the flight animation in seconds.

zoomTo(viewOrExtent, flightDurationSecondsopt)

Source:

Zooms to a specified camera view or extent with a smooth flight animation.

Parameters:
Name Type Attributes Default Description
viewOrExtent CameraView | Rectangle

The view or extent to which to zoom.

flightDurationSeconds Number <optional>
3.0

The length of the flight animation in seconds.