Constructor
    
    
    
      
        
      
      new CesiumTerrain()
    
    
    
    
    
    - Since:
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
    
     
    
        Extends
        
    
    
    
    
    
    
    
    
        Members
        
            
  
    
  
  defaults :Object
    Default attributes for CesiumTerrain models
    Type:
    
    Properties:
    
    
    
    
    
    - Overrides:
 
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
  
    
  
  type :string
    The name of this type of model
    Type:
    
    
    
    
    
    - Overrides:
 
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
    
    
        Methods
        
            
    
    
    
      
        
      
      addCustomProperties(properties) → {object}
    
    
    
    Given a set of properties from a Feature from this Map Asset model, add any
custom properties to the properties object and return it.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                properties | 
            
            
            
                
object
            
             | 
            
            
            A set of key-value pairs representing the existing
properties of a feature from this asset. | 
        
    
    
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    The properties object with any custom properties added.
    - 
        Type
    
 
    - 
        
object
    
 
    
        
            
    
    
    
      
        
      
      containsFeature(feature) → {boolean}
    
    
    
    Given a feature object from a Feature model, checks if it is part of the
selectedFeatures collection. See featureObject property from
Feature#defaults. For vector and 3d tile models only.
 
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                feature | 
            
            
            
                
*
            
             | 
            
            
            An object that a Map widget uses to represent this feature
in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature | 
        
    
    
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    Returns true if the given feature is part of the
selectedFeatures collection in this asset
    - 
        Type
    
 
    - 
        
boolean
    
 
    
        
            
    
    
    
      
        
      
      createCesiumModel(recreate)
    
    
    
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                recreate | 
            
            
            
                
Boolean
            
             | 
            
            
            Set recreate to true to force the function create
the Cesium Model again. Otherwise, if a cesium model already exists, that is
returned instead. | 
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      featureIsSelected(feature) → {boolean}
    
    
    
    Given a feature object from a Feature model, checks if it is part of the
selectedFeatures collection. See featureObject property from
Feature#defaults. For vector and 3d tile models only.
 
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                feature | 
            
            
            
                
*
            
             | 
            
            
            An object that a Map widget uses to represent this feature
in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature | 
        
    
    
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    Returns true if the given feature is part of the
selectedFeatures collection in this asset
    - 
        Type
    
 
    - 
        
boolean
    
 
    
        
            
    
    
    
      
        
      
      featureIsVisible(properties) → {boolean}
    
    
    
    This function checks whether a feature from the MapAsset is visible on the map
based on the properties of the feature and the MapAsset's filter settings.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                properties | 
            
            
            
                
object
            
             | 
            
            
            The properties of the feature to be filtered. (See
the 'properties' attribute of Feature#defaults.) | 
        
    
    
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    Returns true if the feature passes all the filters, or if
there are no filters set for this MapAsset. Returns false if the feature fails
any of the filters.
    - 
        Type
    
 
    - 
        
boolean
    
 
    
        
            
    
    
    
    
    
    Given a definition for a new date property, and the properties that already
exist on a specific feature, returns a new string with the formatted date.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                config | 
            
            
            
                
MapConfig#CustomDateProperty
            
             | 
            
            
            An object that defines the new
date property to create | 
        
    
        
            
                properties | 
            
            
            
                
object
            
             | 
            
            
            key-value pairs representing existing properties in
a Feature | 
        
    
    
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    The value for the new date property, formatted as defined by
config, for the given feature
    - 
        Type
    
 
    - 
        
string
    
 
    
        
            
    
    
    
    
    
    For a given set of Feature properties and a definition for a new sting
property, returns the value of the custom property. Note that since only static
strings are supported so far, this function essentially just returns the value
of config.value. This function exists to allow support of dynamic strings in
the future (e.g. combining strings from existing properties)
    Parameters:
    
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    The new string for the given Feature property
    - 
        Type
    
 
    - 
        
string
    
 
    
        
            
    
    
    
      
        
      
      getCesiumOptions() → {object}
    
    
    
    Get the asset config's cesiumOptions, if it has any. This will return
a copy of the cesiumOptions object, so that changes made to the
returned object will not affect the original cesiumOptions object.
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    A copy of the cesiumOptions object, or null if there
are no cesiumOptions.
    - 
        Type
    
 
    - 
        
object
    
 
    
        
            
    
    
    
      
        
      
      getCesiumURL() → {string}
    
    
    
    Checks whether there is an asset ID for a Cesium Ion resource and if
so, return the URL to the resource.
    
    
    - Since:
 
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    The URL to the Cesium Ion resource
    - 
        Type
    
 
    - 
        
string
    
 
    
        
            
    
    
    
    
    
    Given properties of a Feature model from this MapAsset, returns the color
associated with that feature.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                properties | 
            
            
            
                
object
            
             | 
            
            
            The properties of the feature to get the color for;
An object containing key-value mapping of property names to properties. (See
the 'properties' attribute of Feature#defaults.) | 
        
    
    
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    The color associated with the given set of
properties.
    - 
        Type
    
 
    - 
        
AssetColor#Color
    
 
    
        
            
    
    
    
      
        
      
      getFeatureAttributes(feature) → {object}
    
    
    
    Given a feature object from a Feature model, returns the attributes
needed to create a Feature model. For vector and 3d tile models only.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                feature | 
            
            
            
                
*
            
             | 
            
            
            An object that a Map widget uses to represent this feature
in the map, e.g. a Cesium.Entity or a Cesium.Cesium3DTileFeature | 
        
    
    
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    An object with properties, mapAsset, featureID, featureObject,
and label properties. Returns null if the feature is not the correct type
for this asset model.
    - 
        Type
    
 
    - 
        
object
    
 
    
        
            
    
    
    
      
        
      
      handleError()
    
    
    
    When the asset can't be loaded, hide it from the map and show an error.
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      initialize(attributesopt, optionsopt)
    
    
    
    Executed when a new CesiumTerrain model is created.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        Attributes | 
        
        
        Description | 
    
    
    
    
        
            
                attributes | 
            
            
            
                
Object
            
             | 
            
                
                
                    <optional> 
                
                
                
                 | 
            
            
            The initial values of the attributes, which will
be set on the model. | 
        
    
        
            
                options | 
            
            
            
                
Object
            
             | 
            
                
                
                    <optional> 
                
                
                
                 | 
            
            
            Options for the initialize function. | 
        
    
    
    
    
    
    
    - Overrides:
 
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      isVisible() → {boolean}
    
    
    
    Checks that the visible attribute is set to true and that the opacity attribute
is greater than zero. If both conditions are met, returns true.
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    Returns true if the MapAsset has opacity > 0 and is visible.
    - 
        Type
    
 
    - 
        
boolean
    
 
    
        
            
    
    
    
      
        
      
      listenToSelectedFeatures()
    
    
    
    Update the appearance of features from this asset when they are
selected or deselected in the map widget.
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      resetStatus()
    
    
    
    Resets the Map Asset's status and statusDetails attributes to their default
values.
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      setError(error)
    
    
    
    Set an error status and message for this asset.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                error | 
            
            
            
                
object
|
string
            
             | 
            
            
            An error object with a status code
attribute or or string with details about the error. | 
        
    
    
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      setListeners()
    
    
    
    Set all of the listeners for this model
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      setReady()
    
    
    
    Set a ready status for this asset.
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      show()
    
    
    
    Make sure the layer is visible. Sets visibility to true if false, and sets
opacity to 0.5 if it's less than 0.05.
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      updateIcon(icon)
    
    
    
    Sanitizes an SVG string and updates the model's 'icon' attribute the sanitized
string. Also sets the 'iconStatus' attribute to 'success'.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                icon | 
            
            
            
                
string
            
             | 
            
            
            An SVG string to use for the MapAsset icon | 
        
    
    
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
            
    
    
    
      
        
      
      usesFeatureType(feature) → {boolean}
    
    
    
    Checks if a feature from the map (a Cesium object) is the type of
feature that this map asset model contains. For example, if a
Cesium3DTilesetFeature is passed to this function, this function
will return true if it is a Cesium3DTileset model, and false if it
is a CesiumVectorData model.
    Parameters:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                feature | 
            
            
            
                
Cesium.Cesium3DTilesetFeature
|
Cesium.Entity
            
             | 
            
            
            feature to be checked. | 
        
    
    
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    true if the feature is an instance of the feature
type set on the asset model, false otherwise.
    - 
        Type
    
 
    - 
        
boolean
    
 
    
        
            
    
    
    
      
        
      
      whenReady() → {Promise}
    
    
    
    Checks if the asset information has been fetched and is ready to use.
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
Returns:
        
    Returns a promise that resolves to this model when ready.
    - 
        Type
    
 
    - 
        
Promise
    
 
    
        
            
    
    
    
      
        
      
      zoomTo(target)
    
    
    
    Indicate that the map widget should navigate to a given target from
this MapAsset.
    Parameters:
    
    
    
    - Since:
 
    
    
    
    - Inherited From:
 
    
    
    
    
    
    
    
    
    
    
    
    
    - Source:
 
    
    
    
    
    
        
    
    
        Type Definitions
        
                
  
    
  
  cesiumOptions
    Type:
    
    Properties:
    
    
    
        
        | Name | 
        
        Type | 
        
        
        Description | 
    
    
    
    
        
            
                ionAssetId | 
            
            
            
                
string
|
number
            
             | 
            
            
            If this terrain is hosted by Cesium Ion,
then Ion asset ID. | 
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    - Source: