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

Add support for images in data tiles #14258

Merged
merged 1 commit into from
Nov 5, 2022
Merged

Conversation

tschaub
Copy link
Member

@tschaub tschaub commented Nov 4, 2022

This makes it so data tiles can contain image data in addition to array data.

Adding support for images in data tiles makes sense as part of a larger plan to render all raster tiles with the WebGL tile renderer. The plan could look something like this:

  1. Add support for images in data tiles (this branch).
  2. Add a new ImageTile (or similarly named) source that extends the DataTile source. This would take a url option that would be a convenience for constructing a loader. The url could be string|Array<string>|function(number, number, number):string (the function form would return a url given z, x, and y tile coordinates. Deprecate the (canvas) tile layer, the TileImage source, and lots of other things.
  3. In a major release, rename the WebGLTile layer to Tile and remove all the deprecated things. The DataTile things could be renamed to RasterTile (so RasterTile and VectorTile would be the two tile classes in the API).

@github-actions
Copy link

github-actions bot commented Nov 4, 2022

📦 Preview the website for this branch here: https://deploy-preview-14258--ol-site.netlify.app/.

@ahocevar
Copy link
Member

ahocevar commented Nov 5, 2022

I agree on most parts of the plan, except for the deprecation of the Canvas tile layer. The reason is canvas reuse on maps that mix raster tile and vector (tile) layers. For such scenarios, it is better to stay within a renderer type (canvas or WebGL).

An alternative to deprecating the canvas tile layer (renderer) could be to make the future image (data) tiles work with the canvas renderer too.

@tschaub tschaub merged commit d7c9c95 into openlayers:main Nov 5, 2022
@tschaub tschaub deleted the image-data branch November 5, 2022 20:07
@tschaub tschaub mentioned this pull request Nov 5, 2022
1 task
@tschaub
Copy link
Member Author

tschaub commented Nov 5, 2022

Good point about the canvas renderer. I put up #14262 with a work in progress implementation of a new ImageTile source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants