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 Map.getImage() #2168

Merged
merged 7 commits into from
Feb 13, 2023
Merged

Add Map.getImage() #2168

merged 7 commits into from
Feb 13, 2023

Conversation

ZeLonewolf
Copy link
Contributor

@ZeLonewolf ZeLonewolf commented Feb 11, 2023

Fixes #2162

This PR adds Map.getImage(), which completes the CRUD methods for image access, along with Map.addImage(), Map.updateImage(), and Map.removeImage().

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Add an entry to CHANGELOG.md under the ## main section.

@ZeLonewolf ZeLonewolf marked this pull request as ready for review February 11, 2023 19:29
@ZeLonewolf ZeLonewolf marked this pull request as draft February 11, 2023 19:42
@ZeLonewolf
Copy link
Contributor Author

Going to add some more test cases

src/ui/map.test.ts Outdated Show resolved Hide resolved
@ZeLonewolf ZeLonewolf marked this pull request as ready for review February 11, 2023 22:45
@ZeLonewolf
Copy link
Contributor Author

This is good to go. I tried and failed to make the unit tests more compact, but at least it's testing all of the non-HTML image types.

src/ui/map.test.ts Outdated Show resolved Hide resolved
src/ui/map.test.ts Outdated Show resolved Hide resolved
@HarelM HarelM merged commit 15fe576 into maplibre:main Feb 13, 2023
@ZeLonewolf ZeLonewolf deleted the zlw-getImage branch February 13, 2023 18:48
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.

Supported method for retrieving sprite images
3 participants