Constructor
new MapAssets()
- Since:
- Source:
Extends
Methods
addAsset(asset, mapModelopt) → {MapAsset}
Add a new MapAsset model to this collection. This is useful if adding
the collection from a Map model, since this method will attach the Map
model to the MapAsset model.
Parameters:
Name |
Type |
Attributes |
Description |
asset |
MapConfig#MapAssetConfig
|
MapAsset
|
|
The configuration
object for the MapAsset model, or the MapAsset model itself. |
mapModel |
MapModel
|
<optional>
|
The Map model that contains this
collection. This is optional, but if provided, it will be attached to
the MapAsset model. |
- Since:
- Source:
Returns:
- Returns the MapAsset model that was added to the
collection.
-
Type
-
MapAsset
findAssetWithFeature(feature) → {MapAsset}
Find the map asset model that contains a feature selected directly from
the map view widget.
Parameters:
Name |
Type |
Description |
feature |
Cesium.Entity
|
Cesium.Cesium3DTilesetFeature
|
The
feature selected from the map view widget. |
- Since:
- Source:
Returns:
- Returns the MapAsset model that contains the
feature.
-
Type
-
MapAsset
getAll(assetType) → {Array.<MapAsset>}
Get a list of MapAsset models from this collection that are of a given
type.
Parameters:
Name |
Type |
Description |
assetType |
'Cesium3DTileset'
|
'CesiumVectorData'
|
'CesiumImagery'
|
'CesiumTerrain'
|
The general type of asset to filter the collection by. |
- Since:
- Source:
Returns:
- Returns an array of MapAsset models that are
instances of the given asset type.
-
Type
-
Array.<MapAsset>
getFeatureAttributes(features) → {Array.<Object>}
Given features selected from the map view widget, get the attributes
required to create new Feature models.
Parameters:
Name |
Type |
Description |
features |
Cesium.Entity
|
Array.<Cesium.Cesium3DTilesetFeature>
|
The
feature selected from the map view widget. |
- Since:
- Source:
Returns:
- Returns an array of attributes that can be used
to create new Feature models.
-
Type
-
Array.<Object>
initialize()
Executed when a new MapAssets collection is created.
- Source:
Creates the type of Map Asset based on the given type. This function is
typically not called directly. It is used by Backbone.js when adding a
new model to the collection.
Parameters:
Name |
Type |
Description |
assetConfig |
MapConfig#MapAssetConfig
|
An object that
configured the source the asset data, as well as metadata and display
properties of the asset. |
- Source:
Returns:
Returns a MapAsset model
-
Type
-
Cesium3DTileset
|
CesiumImagery
|
CesiumTerrain
|
CesiumVectorData
setMapModel(mapModel)
Set the parent map model on each of the MapAsset models in this
collection. This must be the Map model that contains this asset
collection.
Parameters:
Name |
Type |
Description |
mapModel |
MapModel
|
The map model to set on each of the MapAsset
models |
- Source: