Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*/
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}
*/
*/
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}
*/
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}
*/
* @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}
*/
*/
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}
*/
*/
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}
*/
* 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}
*/
* @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}
*/
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({
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}
*/