Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[android] Add a method to make map snapshots#4516

Closed
vkurchatkin wants to merge 5 commits into
mapbox:masterfrom
vkurchatkin:snapshot
Closed

[android] Add a method to make map snapshots#4516
vkurchatkin wants to merge 5 commits into
mapbox:masterfrom
vkurchatkin:snapshot

Conversation

@vkurchatkin
Copy link
Copy Markdown
Contributor

Fixes: #3466

/cc @tobrun

TODO list:

  • - add tests (need some guidance);
  • - maybe move API to MapboxMap instead;
  • - docs.

@tobrun
Copy link
Copy Markdown
Member

tobrun commented Mar 29, 2016

@vkurchatkin this is really awesome, will review soon!

@tobrun tobrun self-assigned this Mar 29, 2016
@tobrun
Copy link
Copy Markdown
Member

tobrun commented Mar 29, 2016

maybe move the API to MaboxMap instead

I haven't reviewed the code or compiled the PR, but here already some feedback:

This would improve our parity with Google so having that in MapboxMap would make more sense.

add support for reusing a bitmap

Google maps supports 2 methods for taking a snapshot:

  • public final void snapshot (GoogleMap.SnapshotReadyCallback callback)
  • public final void snapshot (GoogleMap.SnapshotReadyCallback callback, Bitmap bitmap)

Ideally we also support both where the latter can reuse bitmaps for performance reasons.

add tests (need some guidance);

Hit me up with any questions you have on this. Related to this feature, it will be hard to write proper unit tests for this but we should be able to come up with some integration/ui tests.

@vkurchatkin
Copy link
Copy Markdown
Contributor Author

Google maps supports 2 methods for taking a snapshot

Somehow missed it, makes sense

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Apr 1, 2016
@tobrun tobrun added this to the android-v4.1.0 milestone Apr 1, 2016
@tobrun
Copy link
Copy Markdown
Member

tobrun commented Apr 1, 2016

I'm going to pull this in to our repo to run the CI tests, this will also allow me to rebase the commits.
Thanks again for the contribution!

Update you can follow in #4564

tobrun added a commit that referenced this pull request Apr 1, 2016
@vkurchatkin
Copy link
Copy Markdown
Contributor Author

@tobrun Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants