-
- All Implemented Interfaces:
-
java.lang.Runnable
public class MapSnapshot implements Runnable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
MapSnapshot.MapSnapshotable
public enum
MapSnapshot.Status
-
Field Summary
Fields Modifier and Type Field Description public final static int
INCLUDE_FLAG_UPTODATE
public final static int
INCLUDE_FLAG_EXPIRED
public final static int
INCLUDE_FLAG_SCALED
public final static int
INCLUDE_FLAG_NOTFOUND
public final static int
INCLUDE_FLAGS_ALL
-
Constructor Summary
Constructors Constructor Description MapSnapshot(MapSnapshot.MapSnapshotable pMapSnapshotable, int pIncludeFlags, MapView pMapView)
MapSnapshot(MapSnapshot.MapSnapshotable pMapSnapshotable, int pIncludeFlags, MapTileProviderBase pTileProvider, List<Overlay> pOverlays, Projection pProjection)
-
Method Summary
Modifier and Type Method Description static boolean
isUIThread()
To be used in View-related Overlay's draw methods.Not only are we not able to include View's in the snapshots,but drawing those View's can make the app crash. void
run()
MapSnapshot.Status
getStatus()
Bitmap
getBitmap()
boolean
save(File pFile)
void
onDetach()
void
refreshASAP()
-
-
Constructor Detail
-
MapSnapshot
MapSnapshot(MapSnapshot.MapSnapshotable pMapSnapshotable, int pIncludeFlags, MapView pMapView)
-
MapSnapshot
MapSnapshot(MapSnapshot.MapSnapshotable pMapSnapshotable, int pIncludeFlags, MapTileProviderBase pTileProvider, List<Overlay> pOverlays, Projection pProjection)
-
-
Method Detail
-
isUIThread
static boolean isUIThread()
To be used in View-related Overlay's draw methods.Not only are we not able to include View's in the snapshots,but drawing those View's can make the app crash.A solution is to catch an Exception when drawing,and to be lenient when we're not on the UI thread
-
run
void run()
-
getStatus
MapSnapshot.Status getStatus()
-
onDetach
void onDetach()
-
refreshASAP
void refreshASAP()
-
-
-
-