Skip to content

Commit 4e4f0d9

Browse files
author
Hannah
authored
Merge pull request #6250 from AnalyticalGraphicsInc/dont-send-key-with-bing-tiles
Don't send key with every Bing tile request.
2 parents 16fd74e + 2c9c382 commit 4e4f0d9

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Change Log
2222
* Fixed bug where 3D Tiles Point Clouds would fail in Internet Explorer. [#6220](https://github.com/AnalyticalGraphicsInc/cesium/pull/6220)
2323
* Fixed `Material` so it can now take a `Resource` object as an image. [#6199](https://github.com/AnalyticalGraphicsInc/cesium/issues/6199)
2424
* Fixed issue where `CESIUM_BASE_URL` wouldn't work without a trailing `/`. [#6225](https://github.com/AnalyticalGraphicsInc/cesium/issues/6225)
25+
* Fixed an issue causing the Bing Maps key to be sent unnecessarily with every tile request. [#6250](https://github.com/AnalyticalGraphicsInc/cesium/pull/6250)
2526
* Fixed documentation issue for the `Cesium.Math` class. [#6233](https://github.com/AnalyticalGraphicsInc/cesium/issues/6233)
2627

2728
##### Additions :tada:

Source/Scene/BingMapsImageryProvider.js

+4-9
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,10 @@ define([
109109
this._key = BingMapsApi.getKey(options.key);
110110
this._keyErrorCredit = BingMapsApi.getErrorCredit(options.key);
111111

112-
var urlResource = Resource.createIfNeeded(options.url, {
112+
this._resource = Resource.createIfNeeded(options.url, {
113113
proxy: options.proxy
114114
});
115115

116-
urlResource.setQueryParameters({
117-
key: this._key
118-
});
119-
120-
this._resource = urlResource;
121-
122116
this._tileProtocol = options.tileProtocol;
123117
this._mapStyle = defaultValue(options.mapStyle, BingMapsStyle.AERIAL);
124118
this._culture = defaultValue(options.culture, '');
@@ -157,10 +151,11 @@ define([
157151
this._ready = false;
158152
this._readyPromise = when.defer();
159153

160-
var metadataResource = urlResource.getDerivedResource({
154+
var metadataResource = this._resource.getDerivedResource({
161155
url:'/REST/v1/Imagery/Metadata/' + this._mapStyle,
162156
queryParameters: {
163-
incl: 'ImageryProviders'
157+
incl: 'ImageryProviders',
158+
key: this._key
164159
}
165160
});
166161
var that = this;

0 commit comments

Comments
 (0)