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 RasterTileSource setTiles method #3208

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

wagewarbler
Copy link
Contributor

@wagewarbler wagewarbler commented Oct 11, 2023

Resolves #3207. Adds a setTiles method to RasterTileSource. Changes made:

  • Add setTiles to RasterTileSource
  • Add unit test to confirm tiles update
  • Changelog entry
Screencast.from.2023-10-11.13-43-31.webm

@wagewarbler wagewarbler requested a review from HarelM October 12, 2023 15:07
@HarelM HarelM merged commit 2bd4d87 into maplibre:main Oct 12, 2023
@HarelM
Copy link
Collaborator

HarelM commented Oct 12, 2023

If you need this released please open a PR with version bump and I'll carve out a release.

@dabreegster
Copy link
Contributor

Apologies if I should open an issue instead, but how can this new API call be used from regular code? map.getSource("some-raster-source").setTiles([...]) fails, because getSource doesn't seem to return a RasterTileSource object, and casting doesn't do anything.

@HarelM
Copy link
Collaborator

HarelM commented Oct 20, 2023

Which version are you using?
Might be a typings issue in theory, but casting should work...

@dabreegster
Copy link
Contributor

Huh, false alarm -- sorry. I'm using 3.5.1. I just tried the same code again and it's fine. I suspect yesterday my browser cache was pulling in something old, despite force-refreshing.

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.

Add setTiles capability to RasterTileSource
3 participants