Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated addQueryParameters and addTemplateValues #7695

Merged
merged 1 commit into from
Apr 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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. [#7695](https://github.com/AnalyticalGraphicsInc/cesium/issues/7695)

##### 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