Skip to content

Commit

Permalink
Remove deprecated addQueryParameters and addTemplateValues
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Apr 1, 2019
1 parent 46cdb02 commit 3643a8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 31 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Change Log
##### Breaking Changes :mega:
* `Resource.fetchImage` now returns an `ImageBitmap` instead of `Image` when supported. This allows for decoding images while fetching using `createImageBitmap` to greatly speed up texture upload and decrease frame drops when loading models with large textures. [#7579](https://github.com/AnalyticalGraphicsInc/cesium/pull/7579)
* `Cesium3DTileStyle.style` now has an empty `Object` as its default value, instead of `undefined`. [#7567](https://github.com/AnalyticalGraphicsInc/cesium/issues/7567)
* In the `Resource` class, `addQueryParameters` and `addTemplateValues` have been removed. Please use `setQueryParameters` and `setTemplateValues` instead.

##### Deprecated :hourglass_flowing_sand:
* `Resource.fetchImage` now takes an options object. Use `resource.fetchImage({ preferBlob: true })` instead of `resource.fetchImage(true)`. The previous function definition will no longer work in 1.57. [#7579](https://github.com/AnalyticalGraphicsInc/cesium/pull/7579)
Expand Down
32 changes: 1 addition & 31 deletions Source/Core/Resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,21 +601,6 @@ define([
}
};

/**
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
* as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
*
* @param {Object} params The query parameters
* @param {Boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.
*
* @deprecated
*/
Resource.prototype.addQueryParameters = function(params, useAsDefault) {
deprecationWarning('Resource.addQueryParameters', 'addQueryParameters has been deprecated and will be removed 1.45. Use setQueryParameters or appendQueryParameters instead.');

return this.setQueryParameters(params, useAsDefault);
};

/**
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
* as opposed to adding them one at a time to the queryParameters property.
Expand All @@ -641,21 +626,6 @@ define([
}
};

/**
* Combines the specified object and the existing template values. This allows you to add many values at once,
* as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
*
* @param {Object} template The template values
* @param {Boolean} [useAsDefault=false] If true the values will be used as the default values, so they will only be set if they are undefined.
*
* @deprecated
*/
Resource.prototype.addTemplateValues = function(template, useAsDefault) {
deprecationWarning('Resource.addTemplateValues', 'addTemplateValues has been deprecated and will be removed 1.45. Use setTemplateValues.');

return this.setTemplateValues(template, useAsDefault);
};

/**
* Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.
*
Expand Down Expand Up @@ -899,7 +869,7 @@ define([
*/
Resource.prototype.fetchImage = function (options) {
if (typeof options === 'boolean') {
deprecationWarning('fetchImage-parameter-change', 'fetchImage now takes an options object in CesiumJS 1.56. Use resource.fetchImage({ preferBlob: true }) instead of resource.fetchImage(true).');
deprecationWarning('fetchImage-parameter-change', 'fetchImage now takes an options object in CesiumJS 1.57. Use resource.fetchImage({ preferBlob: true }) instead of resource.fetchImage(true).');
options = {
preferBlob : options
};
Expand Down

0 comments on commit 3643a8d

Please sign in to comment.