lib/Models/TableDataSource.js
function(
  terria,
  tableStructure,
  tableStyle,
  name,
  isUpdating
) {
  this._guid = createGuid(); // Used internally to give features a globally unique id.
  this._name = name;
  this._isUpdating = isUpdating || false;
  this._hasFeaturePerRow = undefined; // If this changes, need to remove old features.
  this._changed = new CesiumEvent();
  this._error = new CesiumEvent();
  this._loading = new CesiumEvent();
  this._entityCollection = new EntityCollection(this);
  this._entityCluster = new EntityCluster();
  this._terria = terria;

  this._tableStructure = defined(tableStructure)
    ? tableStructure
    : new TableStructure();
  if (defined(tableStyle) && !(tableStyle instanceof TableStyle)) {
    throw new DeveloperError("Please pass a TableStyle object.");
  }

  /**
   * Gets the TableStyle object showing how to style the data.
   * @memberof TableDataSource.prototype
   * @type {TableStyle}
   */
  this.tableStyle = tableStyle; // Can be undefined.

  this._legendHelper = undefined;
  this._legendUrl = undefined;
  this._extent = undefined;
  this._rowObjects = undefined; // The most recent properties and descriptions are saved here.
  this._rowDescriptions = undefined;

  this.loadingData = false;

  // Track _tableStructure so that csvCatalogItem's concepts are maintained.
  // Track _legendUrl so that csvCatalogItem can update the legend if it changes.
  // Track _extent so that the TableCatalogItem's rectangle updates properly, which also feeds into catalog item's canZoomTo property.
  knockout.track(this, ["_tableStructure", "_legendUrl", "_extent"]);

  // Whenever the active item is changed, recalculate the legend and the display of all the entities.
  // This is triggered both on deactivation and on reactivation, ie. twice per change; it would be nicer to trigger once.
  knockout
    .getObservable(this._tableStructure, "activeItems")
    .subscribe(changedActiveItems.bind(null, this), this);
}
function(
  terria,
  tableStructure,
  tableStyle,
  name,
  isUpdating
) {
  this._guid = createGuid(); // Used internally to give features a globally unique id.
  this._name = name;
  this._isUpdating = isUpdating || false;
  this._hasFeaturePerRow = undefined; // If this changes, need to remove old features.
  this._changed = new CesiumEvent();
  this._error = new CesiumEvent();
  this._loading = new CesiumEvent();
  this._entityCollection = new EntityCollection(this);
  this._entityCluster = new EntityCluster();
  this._terria = terria;

  this._tableStructure = defined(tableStructure)
    ? tableStructure
    : new TableStructure();
  if (defined(tableStyle) && !(tableStyle instanceof TableStyle)) {
    throw new DeveloperError("Please pass a TableStyle object.");
  }

  /**
   * Gets the TableStyle object showing how to style the data.
   * @memberof TableDataSource.prototype
   * @type {TableStyle}
   */
  this.tableStyle = tableStyle; // Can be undefined.

  this._legendHelper = undefined;
  this._legendUrl = undefined;
  this._extent = undefined;
  this._rowObjects = undefined; // The most recent properties and descriptions are saved here.
  this._rowDescriptions = undefined;

  this.loadingData = false;

  // Track _tableStructure so that csvCatalogItem's concepts are maintained.
  // Track _legendUrl so that csvCatalogItem can update the legend if it changes.
  // Track _extent so that the TableCatalogItem's rectangle updates properly, which also feeds into catalog item's canZoomTo property.
  knockout.track(this, ["_tableStructure", "_legendUrl", "_extent"]);

  // Whenever the active item is changed, recalculate the legend and the display of all the entities.
  // This is triggered both on deactivation and on reactivation, ie. twice per change; it would be nicer to trigger once.
  knockout
    .getObservable(this._tableStructure, "activeItems")
    .subscribe(changedActiveItems.bind(null, this), this);
}
function ( terria , tableStructure , tableStyle , name , isUpdating ) { this . _guid = createGuid ( ) ; // Used internally to give features a globally unique id. this . _name = name ; this . _isUpdating = isUpdating || false ; this . _hasFeaturePerRow = undefined ; // If this changes, need to remove old features. this . _changed = new CesiumEvent ( ) ; this . _error = new CesiumEvent ( ) ; this . _loading = new CesiumEvent ( ) ; this . _entityCollection = new EntityCollection ( this ) ; this . _entityCluster = new EntityCluster ( ) ; this . _terria = terria ; this . _tableStructure = defined ( tableStructure ) ? tableStructure : new TableStructure ( ) ; if ( defined ( tableStyle ) && ! ( tableStyle instanceof TableStyle ) ) { throw new DeveloperError ( "Please pass a TableStyle object." ) ; } /**
   * Gets the TableStyle object showing how to style the data.
   * @memberof TableDataSource.prototype
   * @type {TableStyle}
   */ this . tableStyle = tableStyle ; // Can be undefined. this . _legendHelper = undefined ; this . _legendUrl = undefined ; this . _extent = undefined ; this . _rowObjects = undefined ; // The most recent properties and descriptions are saved here. this . _rowDescriptions = undefined ; this . loadingData = false ; // Track _tableStructure so that csvCatalogItem's concepts are maintained. // Track _legendUrl so that csvCatalogItem can update the legend if it changes. // Track _extent so that the TableCatalogItem's rectangle updates properly, which also feeds into catalog item's canZoomTo property. knockout . track ( this , [ "_tableStructure" , "_legendUrl" , "_extent" ] ) ; // Whenever the active item is changed, recalculate the legend and the display of all the entities. // This is triggered both on deactivation and on reactivation, ie. twice per change; it would be nicer to trigger once. knockout . getObservable ( this . _tableStructure , "activeItems" ) . subscribe ( changedActiveItems . bind ( null , this ) , this ) ; }
A DataSource for table-based data where each row corresponds to a single feature or point - not region-mapped.
Generates Cesium entities for each row.
Displaying the points requires a legend.

@name TableDataSource

@alias TableDataSource
@constructor
@param {TableStructure} [tableStructure] The Table Structure instance; defaults to a new one.
@param {TableStyle} [tableStyle] The table style; defaults to undefined.
@param {String} [name] A name to show in the legend if no columns are available.
@param {Boolean} [isUpdating] Is the underlying data going to update? Defaults to false.
If true, replaces constant feature properties and description with a CallbackProperty.
A DataSource for table - based data where each row corresponds to a single feature or point - not region - mapped . Generates Cesium entities for each row . Displaying the points requires a legend .