How to use the terriajs-cesium/Source/Core/defineProperties.default function in terriajs-cesium

To help you get started, we’ve selected a few terriajs-cesium examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TerriaJS / terriajs / lib / Models / WebProcessingServiceCatalogGroup.js View on Github external
*/
  this.executeWithHttpGet = false;

  /**
   * Gets or sets a hash of properties that will be set on each child item.
   * For example, { "treat404AsError": false }
   * @type {Object}
   */
  this.itemProperties = undefined;

  knockout.track(this, ["url", "itemProperties", "executeWithHttpGet"]);
}

inherit(CatalogGroup, WebProcessingServiceCatalogGroup);

defineProperties(WebProcessingServiceCatalogGroup.prototype, {
  /**
   * Gets the type of data member represented by this instance.
   * @memberOf WebProcessingServiceCatalogGroup.prototype
   * @type {String}
   */
  type: {
    get: function() {
      return "wps-getCapabilities";
    }
  },

  /**
   * Gets a human-readable name for this type of data source, such as 'Web Processing Service (WPS)'.
   * @memberOf WebProcessingServiceCatalogGroup.prototype
   * @type {String}
   */
github TerriaJS / terriajs / lib / Models / GpxCatalogItem.js View on Github external
*/
  this.data = undefined;

  /**
   * Gets or sets the URL from which the {@link GpxCatalogItem#data} was obtained.  This may be used
   * to resolve any resources linked in the Gpx file, if any.
   * @type {String}
   */
  this.dataSourceUrl = undefined;

  knockout.track(this, ["data", "dataSourceUrl"]);
};

inherit(CatalogItem, GpxCatalogItem);

defineProperties(GpxCatalogItem.prototype, {
  /**
   * Gets the type of data member represented by this instance.
   * @memberOf GpxCatalogItem.prototype
   * @type {String}
   */
  type: {
    get: function() {
      return "gpx";
    }
  },

  /**
   * Gets a human-readable name for this type of data source, 'GPX'.
   * @memberOf GpxCatalogItem.prototype
   * @type {String}
   */
github TerriaJS / terriajs / lib / Models / WebMapTileServiceCatalogItem.js View on Github external
get: function() {
      if (defined(this._dataUrlType)) {
        return this._dataUrlType;
      } else {
        return "none";
      }
    },
    set: function(value) {
      this._dataUrlType = value;
    }
  });
};

inherit(ImageryLayerCatalogItem, WebMapTileServiceCatalogItem);

defineProperties(WebMapTileServiceCatalogItem.prototype, {
  /**
   * Gets the type of data item represented by this instance.
   * @memberOf WebMapTileServiceCatalogItem.prototype
   * @type {String}
   */
  type: {
    get: function() {
      return "wmts";
    }
  },

  /**
   * Gets a human-readable name for this type of data source, 'Web Map Tile Service (WMTS)'.
   * @memberOf WebMapTileServiceCatalogItem.prototype
   * @type {String}
   */
github TerriaJS / terriajs / lib / Models / TerriaJsonCatalogFunction.js View on Github external
* @type {Number}
   */
  this.acceptedDelay = 10000;

  /**
   * Gets or sets the input parameters to the service.
   * @type {FunctionParameter[]}
   */
  this.inputs = [];

  knockout.track(this, ["url", "inputs"]);
}

inherit(CatalogFunction, TerriaJsonCatalogFunction);

defineProperties(TerriaJsonCatalogFunction.prototype, {
  /**
   * Gets the type of data item represented by this instance.
   * @memberOf TerriaJSONCatalogFunction.prototype
   * @type {String}
   */
  type: {
    get: function() {
      return "terria-json";
    }
  },

  /**acceptedUrl
   * Gets a human-readable name for this type of data source, 'Terria JSON Catalog Function'.
   * @memberOf TerriaJSONCatalogFunction.prototype
   * @type {String}
   */
github TerriaJS / terriajs / lib / Models / OpenStreetMapCatalogItem.js View on Github external
*/
  this.attribution = undefined;

  /**
   * Gets or sets the array of subdomains, one of which will be prepended to each tile URL.
   * This property is observable.
   * @type {Array}
   */
  this.subdomains = undefined;

  knockout.track(this, ["fileExtension", "maximumLevel", "attribution"]);
};

inherit(ImageryLayerCatalogItem, OpenStreetMapCatalogItem);

defineProperties(OpenStreetMapCatalogItem.prototype, {
  /**
   * Gets the type of data item represented by this instance.
   * @memberOf OpenStreetMapCatalogItem.prototype
   * @type {String}
   */
  type: {
    get: function() {
      return "open-street-map";
    }
  },

  /**
   * Gets a human-readable name for this type of data source, 'OpenStreet Map'.
   * @memberOf OpenStreetMapCatalogItem.prototype
   * @type {String}
   */
github TerriaJS / terriajs / lib / Models / KmlCatalogItem.js View on Github external
*/
  this.data = undefined;

  /**
   * Gets or sets the URL from which the {@link KmlCatalogItem#data} was obtained.  This will be used
   * to resolve any resources linked in the KML file, if any.  This property is observable.
   * @type {String}
   */
  this.dataSourceUrl = undefined;

  knockout.track(this, ["data", "dataSourceUrl"]);
};

inherit(DataSourceCatalogItem, KmlCatalogItem);

defineProperties(KmlCatalogItem.prototype, {
  /**
   * Gets the type of data member represented by this instance.
   * @memberOf KmlCatalogItem.prototype
   * @type {String}
   */
  type: {
    get: function() {
      return "kml";
    }
  },

  /**
   * Gets a human-readable name for this type of data source, 'KML'.
   * @memberOf KmlCatalogItem.prototype
   * @type {String}
   */
github TerriaJS / terriajs / lib / Models / IonImageryCatalogItem.js View on Github external
* using the `cesiumIonAccessToken` property in `config.json` is used.
   * @type {String}
   */
  this.ionAccessToken = undefined;

  /**
   * Gets or sets the Cesium Ion access token to use to access the imagery. If not specified, the default Ion
   * server, `https://api.cesium.com/`, is used.
   * @type {String}
   */
  this.ionServer = undefined;
};

inherit(ImageryLayerCatalogItem, IonImageryCatalogItem);

defineProperties(IonImageryCatalogItem.prototype, {
  /**
   * Gets the type of data item represented by this instance.
   * @memberOf UrlTemplateCatalogItem.prototype
   * @type {String}
   */
  type: {
    get: function() {
      return "ion-imagery";
    }
  },

  /**
   * Gets a human-readable name for this type of data source, 'Cesium Ion Imagery'.
   * @memberOf UrlTemplateCatalogItem.prototype
   * @type {String}
   */
github TerriaJS / terriajs / lib / Models / ArcGisFeatureServerCatalogGroup.js View on Github external
* @type {Object}
   */
  this.blacklist = undefined;

  /**
   * Gets or sets a hash of properties that will be set on each child item.
   * For example, { 'treat404AsError': false }
   */
  this.itemProperties = undefined;

  knockout.track(this, ["url", "dataCustodian", "blacklist", "itemProperties"]);
};

inherit(CatalogGroup, ArcGisFeatureServerCatalogGroup);

defineProperties(ArcGisFeatureServerCatalogGroup.prototype, {
  /**
   * Gets the type of data member represented by this instance.
   * @memberOf ArcGisFeatureServerCatalogGroup.prototype
   * @type {String}
   */
  type: {
    get: function() {
      return "esri-featureServer-group";
    }
  },

  /**
   * Gets a human-readable name for this type of data source, such as 'Web Map Service (WMS)'.
   * @memberOf ArcGisFeatureServerCatalogGroup.prototype
   * @type {String}
   */
github TerriaJS / terriajs / lib / Models / GoogleUrlShortener.js View on Github external
var TerriaError = require("../Core/TerriaError");

var GoogleUrlShortener = function(options) {
  if (!defined(options) || !defined(options.terria)) {
    throw new DeveloperError("options.terria is required.");
  }

  this.terria = options.terria;
  this.url = defaultValue(
    options.url,
    "https://www.googleapis.com/urlshortener/v1/url"
  );
};

defineProperties(GoogleUrlShortener.prototype, {
  isUsable: {
    get: function() {
      var key = this.terria.configParameters.googleUrlShortenerKey;
      return defined(key) && key !== null;
    }
  }
});

GoogleUrlShortener.prototype.shorten = function(url) {
  if (!this.isUsable) {
    throw new DeveloperError(
      "GoogleUrlShortener is not usable because Terria.configPrameters.googleUrlShortenerKey is not defined."
    );
  }

  return loadWithXhr({
github TerriaJS / terriajs / lib / Models / Catalog.js View on Github external
CHART_DATA_CATEGORY_NAME,
      "A group for chart data."
    )
  });

  /**
   * Array of the items that should be shown as a chart.
   */
  knockout.defineProperty(this, "chartableItems", {
    get: function() {
      return this._chartableItems;
    }
  });
};

defineProperties(Catalog.prototype, {
  /**
   * Gets the Terria instance.
   * @memberOf Catalog.prototype
   * @type {Terria}
   */
  terria: {
    get: function() {
      return this._terria;
    }
  },

  /**
   * Gets the catalog's top-level group.
   * @memberOf Catalog.prototype
   * @type {CatalogGroup}
   */