-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into emissive-fix
- Loading branch information
Showing
25 changed files
with
277 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,35 @@ | ||
define([ | ||
'./Credit', | ||
'./defined' | ||
], function( | ||
Credit, | ||
defined) { | ||
'use strict'; | ||
|
||
/** | ||
* Object for setting and retrieving the default BingMaps API key. | ||
* Object for setting and retrieving the default Bing Maps API key. | ||
* | ||
* A Bing API key is only required if you are using {@link BingMapsImageryProvider} | ||
* or {@link BingMapsGeocoderService}. You can create your own key at | ||
* {@link https://www.bingmapsportal.com/}. | ||
* | ||
* @exports BingMapsApi | ||
*/ | ||
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 | ||
* {@link https://www.bingmapsportal.com/} | ||
* 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. | ||
* constructor of an object that uses the Bing Maps API. | ||
* | ||
* @type {String} | ||
*/ | ||
BingMapsApi.defaultKey = undefined; | ||
|
||
var printedBingWarning = false; | ||
var errorCredit; | ||
var errorString = '<b>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 <a href="https://www.bingmapsportal.com/">https://www.bingmapsportal.com/</a>, 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.</b>'; | ||
|
||
BingMapsApi.getKey = function(providedKey) { | ||
if (defined(providedKey)) { | ||
return providedKey; | ||
} | ||
|
||
if (!defined(BingMapsApi.defaultKey)) { | ||
if (!printedBingWarning) { | ||
console.log(errorString); | ||
printedBingWarning = true; | ||
} | ||
return 'Ar9n20kTp-N8tEg3Dpx-Pgocmx3W0-GUnD_Bgt3h8g6pSeDL8yxByTVGHyMyjI2p'; | ||
} | ||
|
||
return BingMapsApi.defaultKey; | ||
}; | ||
|
||
BingMapsApi.getErrorCredit = function(providedKey) { | ||
if (defined(providedKey) || defined(BingMapsApi.defaultKey)) { | ||
return undefined; | ||
} | ||
|
||
if (!defined(errorCredit)) { | ||
errorCredit = new Credit(errorString, true); | ||
} | ||
|
||
return errorCredit; | ||
}; | ||
|
||
return BingMapsApi; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
define([ | ||
'../Core/freezeObject' | ||
], function( | ||
freezeObject) { | ||
'use strict'; | ||
|
||
// Note, these values map directly to ion asset ids. | ||
|
||
/** | ||
* The types of imagery provided by {@link createWorldImagery}. | ||
* | ||
* @exports IonWorldImageryStyle | ||
*/ | ||
var IonWorldImageryStyle = { | ||
/** | ||
* Aerial imagery. | ||
* | ||
* @type {String} | ||
* @constant | ||
*/ | ||
AERIAL : 2, | ||
|
||
/** | ||
* Aerial imagery with a road overlay. | ||
* | ||
* @type {String} | ||
* @constant | ||
*/ | ||
AERIAL_WITH_LABELS : 3, | ||
|
||
/** | ||
* Roads without additional imagery. | ||
* | ||
* @type {String} | ||
* @constant | ||
*/ | ||
ROAD : 4 | ||
}; | ||
|
||
return freezeObject(IonWorldImageryStyle); | ||
}); |
Oops, something went wrong.