Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a new version of the changes in #14262. I needed to squash the commits to deal with all the conflicts in the past couple years.
This adds a new
ol/source/ImageTile.js
module that is intended to replace the following:ol/source/UrlTile.js
ol/source/TileImage.js
ol/source/XYZ.js
ol/ImageTile.js
ol/tileurlfunction.js
The new source accepts a
url
option that can be a single URL template, an array of URL templates, or a function that returns a URL. The resulting loader returns a promise that creates an image, sets its src, and resolves when the image loads. For more complex image loading scenarios, the source can be passed aloader
option.Since we have some breaking changes already merged in, I thought it could make sense to deprecate a few things and merge this in.
When we are ready to remove
ol/source/TileImage.js
, we can update the the 9 sources that extendTileImage
to instead extend theImageTile
source. This will be a breaking change since some of the options no longer make sense (tileLoadFunction
,urls
,cacheSize
).