Skip to content

Commit

Permalink
Merge pull request #6250 from AnalyticalGraphicsInc/dont-send-key-wit…
Browse files Browse the repository at this point in the history
…h-bing-tiles

Don't send key with every Bing tile request.
  • Loading branch information
Hannah committed Feb 22, 2018
2 parents 16fd74e + 2c9c382 commit 4e4f0d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Change Log
* Fixed bug where 3D Tiles Point Clouds would fail in Internet Explorer. [#6220](https://github.com/AnalyticalGraphicsInc/cesium/pull/6220)
* Fixed `Material` so it can now take a `Resource` object as an image. [#6199](https://github.com/AnalyticalGraphicsInc/cesium/issues/6199)
* Fixed issue where `CESIUM_BASE_URL` wouldn't work without a trailing `/`. [#6225](https://github.com/AnalyticalGraphicsInc/cesium/issues/6225)
* Fixed an issue causing the Bing Maps key to be sent unnecessarily with every tile request. [#6250](https://github.com/AnalyticalGraphicsInc/cesium/pull/6250)
* Fixed documentation issue for the `Cesium.Math` class. [#6233](https://github.com/AnalyticalGraphicsInc/cesium/issues/6233)

##### Additions :tada:
Expand Down
13 changes: 4 additions & 9 deletions Source/Scene/BingMapsImageryProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,10 @@ define([
this._key = BingMapsApi.getKey(options.key);
this._keyErrorCredit = BingMapsApi.getErrorCredit(options.key);

var urlResource = Resource.createIfNeeded(options.url, {
this._resource = Resource.createIfNeeded(options.url, {
proxy: options.proxy
});

urlResource.setQueryParameters({
key: this._key
});

this._resource = urlResource;

this._tileProtocol = options.tileProtocol;
this._mapStyle = defaultValue(options.mapStyle, BingMapsStyle.AERIAL);
this._culture = defaultValue(options.culture, '');
Expand Down Expand Up @@ -157,10 +151,11 @@ define([
this._ready = false;
this._readyPromise = when.defer();

var metadataResource = urlResource.getDerivedResource({
var metadataResource = this._resource.getDerivedResource({
url:'/REST/v1/Imagery/Metadata/' + this._mapStyle,
queryParameters: {
incl: 'ImageryProviders'
incl: 'ImageryProviders',
key: this._key
}
});
var that = this;
Expand Down

0 comments on commit 4e4f0d9

Please sign in to comment.