Package globus.glmap
Interface GLMapImageGroupCallback
public interface GLMapImageGroupCallback
GLMapImageGroupCallback tells the image group about its contents.-
Method Summary
Modifier and TypeMethodDescriptionintgetImageIndex(int i) Return variant of image to usegetImagePos(int i) Returns location of image on the map.intReturn total number of images that will be displayed by image groupandroid.graphics.BitmapgetImageVariantBitmap(int i) Return bitmap to use for given variant of imagegetImageVariantOffset(int i) Returns the anchor offset to use for a given image variant.intReturn number of unique images which will be used by image groupvoidCall when update finished.voidCall when update started.
-
Method Details
-
getImageVariantsCount
int getImageVariantsCount()Return number of unique images which will be used by image group- Returns:
- number of unique images
-
getImageVariantBitmap
android.graphics.Bitmap getImageVariantBitmap(int i) Return bitmap to use for given variant of image- Parameters:
i- index of image variant (0 .. variantsCount-1)- Returns:
- bitmap to use for given variant of image
-
getImageVariantOffset
Returns the anchor offset to use for a given image variant.- Parameters:
i- index of image variant (0 .. variantsCount-1)- Returns:
- offset vector in screen pixels.
xis horizontal offset andyis vertical offset. (Note:MapPointis used here as a simple 2D vector container.)
-
getImagesCount
int getImagesCount()Return total number of images that will be displayed by image group- Returns:
- number of images
-
getImageIndex
int getImageIndex(int i) Return variant of image to use- Parameters:
i- index of image (0 .. imagesCount-1)- Returns:
- index of image variant to use (0 .. variantsCount-1)
-
getImagePos
Returns location of image on the map.- Parameters:
i- index of image (0 .. imagesCount-1)- Returns:
- point on map in internal map coordinates
-
updateStarted
void updateStarted()Call when update started. Lock data until updateFinished is called. Update can start when big changes of zoom happened. -
updateFinished
void updateFinished()Call when update finished.
-