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

Snapshotter #512

Merged
merged 18 commits into from
Apr 30, 2024
Merged

Snapshotter #512

merged 18 commits into from
Apr 30, 2024

Conversation

evil159
Copy link
Contributor

@evil159 evil159 commented Apr 26, 2024

What does this pull request do?

This PR exposes Snapshotter and introduces refactored event handing for MapWidget that is also reused for Snapshotter. Event listeners(map loaded, style loaded, map idle etc.) are no longer being ignored after MapWidget state initialization, they can be updated dynamically.

Based #386.
Addresses #210, #279, https://mapbox.atlassian.net/browse/MAPSFLT-159

What is the motivation and context behind this change?

Snapshotter provides a way to get an image snapshot of a map without instantiating a MapWidget

Pull request checklist:

  • Add a changelog entry.
  • Write tests for all new functionality. If tests were not written, please explain why.
  • Add documentation comments for any added or updated public APIs.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
example/lib/snapshotter.dart Outdated Show resolved Hide resolved
ios/Classes/Extensions.swift Outdated Show resolved Hide resolved
@pjleonard37
Copy link
Contributor

Looks great, @evil159! 📸

evil159 and others added 5 commits April 30, 2024 22:40
Co-authored-by: Patrick Leonard <pjleonard37@users.noreply.github.com>
* Add method to capture snapshot from mapbox map

* Change snapshot type to int list

* Add integration test
Co-authored-by: Patrick Leonard <pjleonard37@users.noreply.github.com>
@evil159 evil159 enabled auto-merge (squash) April 30, 2024 20:23
@evil159 evil159 merged commit 0f244cc into main Apr 30, 2024
5 checks passed
@evil159 evil159 deleted the rl/snapshotter branch April 30, 2024 20:26
onStyleImageMissingListener: widget.onStyleImageMissingListener,
onStyleImageUnusedListener: widget.onStyleImageUnusedListener,
onResourceRequestListener: widget.onResourceRequestListener,
onMapTapListener: widget.onTapListener,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onMapTapListener does no longer works in our app after this commit. Should we migrate to something else. If so what is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the heads up, this was removed accidentally, it is restored in #526

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.

None yet

4 participants