Class: Features

Features()

A Features collection contains the relevant properties of a group of selected geo-spatial features from a map.

Constructor

new Features()

Since:
  • 2.18.0
Source:

Extends

  • Backbone.Collection

Members

model :Backbone.Model

The class/model that this collection contains.
Type:
  • Backbone.Model
Source:

Methods

containsFeature(featureObject) → {boolean}

Checks if a given feature object is an attribute in one of the Feature models in this collection.
Parameters:
Name Type Description
featureObject Feature | Cesium.Cesium3DTilesetFeature | Cesium.Entity
Since:
  • 2.25.0
Source:
Returns:
Returns true if the given feature object is in this collection, false otherwise.
Type
boolean

containsFeatures(featureObjects) → {boolean}

Checks if a given array of feature objects are attributes in one of the Feature models in this collection.
Parameters:
Name Type Description
featureObjects Array An array of feature objects to check if they are in this collection.
Source:
Returns:
Returns true if all of the given feature objects are in this collection, false otherwise.
Type
boolean

getFeatureObjects(typeopt) → {Array}

Get an array of all the unique feature objects associated with this collection.
Parameters:
Name Type Attributes Description
type string <optional>
Optionally set a type of feature to return. If set, then only features that have this constructor name will be returned.
Source:
Returns:
Returns an array of all of the unique feature objects in the collection. Feature objects are the objects used by the map widget to represent a feature in the map. For example, in Cesium this could be a Cesium3DTileFeature or an Entity.
Type
Array

getMapAssets() → {Array.<MapAsset>}

Get an array of all of the unique Map Assets that are associated with this collection. (When a feature model is part of a layer, it will have the layer model (Map Asset) set as a property)
Source:
Returns:
Returns an a array of all the unique Map Assets (imagery, tile sets, etc.) in this collection.
Type
Array.<MapAsset>

getUniqueAttrs(attrName) → {Array}

Get an array of unique values for some attribute that may be set on the models in this collection
Parameters:
Name Type Description
attrName string The name of the attr to get unique values for
Source:
Returns:
Returns an array of unique values of the given attribute
Type
Array