Sha256: 98cbcc2166ecff485ff7fe1e6fcc43d57cc9fac9b1195169ee6f574ea262f351

Contents?: true

Size: 1.62 KB

Versions: 4

Compression:

Stored size: 1.62 KB

Contents

/*global define,console*/
define(['Core/defined'], function(
        defined) {
    "use strict";

    var BingMapsApi = {
    };

    /**
     * The default Bing Maps API key to use if one is not provided to the
     * constructor of an object that uses the Bing Maps API.  If this property is undefined,
     * Cesium's default key is used, which is only suitable for use early in development.
     * Please generate your own key by visiting
     * <a href='https://www.bingmapsportal.com/'>https://www.bingmapsportal.com/</a>
     * as soon as possible and prior to deployment.  When Cesium's default key is used,
     * a message is printed to the console the first time the Bing Maps API is used.
     *
     * @type {String}
     */
    BingMapsApi.defaultKey = undefined;

    var printedBingWarning = false;

    BingMapsApi.getKey = function(providedKey) {
        if (defined(providedKey)) {
            return providedKey;
        }

        if (!defined(BingMapsApi.defaultKey)) {
            if (!printedBingWarning) {
                console.log('This application is using Cesium\'s default Bing Maps key.  Please create a new key for the application as soon as possible and prior to deployment by visiting https://www.bingmapsportal.com/, and provide your key to Cesium by setting the Cesium.BingMapsApi.defaultKey property before constructing the CesiumWidget or any other object that uses the Bing Maps API.');
                printedBingWarning = true;
            }
            return 'Aj1ony_-Typ-KjG9SJWiKSHY23U1KmK7yAmZa9lDmuF2osXWkcZ22VPsqmCt0TCt';
        }

        return BingMapsApi.defaultKey;
    };

    return BingMapsApi;
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cesium-0.23.0 app/assets/javascripts/Core/BingMapsApi.js
cesium-0.22.0 app/assets/javascripts/Core/BingMapsApi.js
cesium-0.21.1 app/assets/javascripts/Core/BingMapsApi.js
cesium-0.21 app/assets/javascripts/Core/BingMapsApi.js