Add existing to tracked
This commit is contained in:
+80
@@ -0,0 +1,80 @@
|
||||
import Credit from "../Core/Credit.js";
|
||||
import defined from "../Core/defined.js";
|
||||
import Resource from "../Core/Resource.js";
|
||||
|
||||
let defaultTokenCredit;
|
||||
const defaultAccessToken =
|
||||
"AAPTa7BPWL4PoZRFPJ2CM2YRclg..ub1vMOBXctC7ozMMKNnmx3ZwVTsDJAXo2GLomQ2CZjuOc2HLr1-CryeuRo9ZsV65cuZ9xN1yFKeLTu7Cxld7B97aI28os_NnuC9nvWde_l4G1DTApSHmhrVoZfKgO0bqOrsDfvvSgO-cdkUEvBASNX_4Lb9tB5fEY7lbYaWdOOWBXyZylR9il0-biB248V6HdDT1kgkSwz9esfKialRTLgxJx8AFM9is--UXK0CLvZn6JUU44PZSFuMyAT1_rgxsirsZ";
|
||||
/**
|
||||
* Default options for accessing the ArcGIS image tile service.
|
||||
*
|
||||
* An ArcGIS access token is required to access ArcGIS image tile layers.
|
||||
* A default token is provided for evaluation purposes only.
|
||||
* To obtain an access token, go to {@link https://developers.arcgis.com} and create a free account.
|
||||
* More info can be found in the {@link https://developers.arcgis.com/documentation/mapping-apis-and-services/security/ | ArcGIS developer guide}.
|
||||
*
|
||||
* @see ArcGisMapServerImageryProvider
|
||||
* @namespace ArcGisMapService
|
||||
*/
|
||||
|
||||
const ArcGisMapService = {};
|
||||
/**
|
||||
* Gets or sets the default ArcGIS access token.
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
ArcGisMapService.defaultAccessToken = defaultAccessToken;
|
||||
|
||||
/**
|
||||
* Gets or sets the URL of the ArcGIS World Imagery tile service.
|
||||
*
|
||||
* @type {string|Resource}
|
||||
* @default https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer
|
||||
*/
|
||||
ArcGisMapService.defaultWorldImageryServer = new Resource({
|
||||
url: "https://ibasemaps-api.arcgis.com/arcgis/rest/services/World_Imagery/MapServer",
|
||||
});
|
||||
|
||||
/**
|
||||
* Gets or sets the URL of the ArcGIS World Hillshade tile service.
|
||||
*
|
||||
* @type {string|Resource}
|
||||
* @default https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer
|
||||
*/
|
||||
ArcGisMapService.defaultWorldHillshadeServer = new Resource({
|
||||
url: "https://ibasemaps-api.arcgis.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer",
|
||||
});
|
||||
|
||||
/**
|
||||
* Gets or sets the URL of the ArcGIS World Oceans tile service.
|
||||
*
|
||||
* @type {string|Resource}
|
||||
* @default https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer
|
||||
*/
|
||||
ArcGisMapService.defaultWorldOceanServer = new Resource({
|
||||
url: "https://ibasemaps-api.arcgis.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer",
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} providedKey
|
||||
* @return {string|undefined}
|
||||
*/
|
||||
ArcGisMapService.getDefaultTokenCredit = function (providedKey) {
|
||||
if (providedKey !== defaultAccessToken) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (!defined(defaultTokenCredit)) {
|
||||
const defaultTokenMessage =
|
||||
'<b> \
|
||||
This application is using a default ArcGIS access token. Please assign <i>Cesium.ArcGisMapService.defaultAccessToken</i> \
|
||||
with an API key from your ArcGIS Developer account before using the ArcGIS tile services. \
|
||||
You can sign up for a free ArcGIS Developer account at <a href="https://developers.arcgis.com/">https://developers.arcgis.com/</a>.</b>';
|
||||
|
||||
defaultTokenCredit = new Credit(defaultTokenMessage, true);
|
||||
}
|
||||
|
||||
return defaultTokenCredit;
|
||||
};
|
||||
export default ArcGisMapService;
|
||||
Reference in New Issue
Block a user