-
Notifications
You must be signed in to change notification settings - Fork 982
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
MapView fully loaded callback / MapView Screenshot Functionality #1737
Comments
Hi @abinpaul1! |
Yes. That was exactly what was required. Thanks a lot. Just adding the snippet to take snapshot of a Mapview hear incase anyone wants a quick sample final MapSnapshot mapSnapshot = new MapSnapshot(new MapSnapshot.MapSnapshotable() {
@Override
public void callback(final MapSnapshot pMapSnapshot) {
if (pMapSnapshot.getStatus() != MapSnapshot.Status.CANVAS_OK) {
return;
}
final Bitmap bitmap = Bitmap.createBitmap(pMapSnapshot.getBitmap());
// Do something with the bitmap like save to file
}
}, MapSnapshot.INCLUDE_FLAG_UPTODATE, pMapView);
new Thread(mapSnapshot).start(); |
@abinpaul1 Cool! Feel free to create a new page in the wiki. |
I have added it here : https://github.com/osmdroid/osmdroid/wiki/Taking-Snapshot-of-Maps |
@abinpaul1 Well done! There's another demo that could be interesting for you called "Tile States", based on Feel free to close this issue. |
Please note: issues related to or caused by osmbonuspack will be closed with a
suggestion to open an issue at https://github.com/MKergall/osmbonuspack
(feel free to delete whatever doesn't apply)
Issue Type
[ ] Question
[ ] Bug
[ X] Improvement
[ ] Build system related
[ ] Performance
[ ] Documentation
Description
Currently there is no option to know when a Mapview is fully loaded with all the tiles. This could be helpful to create a static screenshot of MapView instead of relying on a server-side Static Map API.
A functionality similar to snapshot method in Google's MapView would also be useful.
The text was updated successfully, but these errors were encountered: