Class: MapAssets

MapAssets()

A MapAssets collection is a group of MapAsset models - models that provide the information required to render geo-spatial data on a map, including imagery (raster), vector, and terrain data.

Constructor

new MapAssets()

Since:
  • 2.18.0
Source:

Extends

  • Backbone.Collection

Methods

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:
  • 2.22.0
Source:
Returns:
- Returns an array of MapAsset models that are instances of the given asset type.
Type
Array.<MapAsset>

initialize()

Executed when a new MapAssets collection is created.
Source:

model(assetConfig) → {Cesium3DTileset|CesiumImagery|CesiumTerrain|CesiumVectorData}

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: