Package com.mapsindoors.mapssdk
Class MPImageProvider
- java.lang.Object
-
- com.mapsindoors.mapssdk.MPImageProvider
-
- All Implemented Interfaces:
ImageProvider
public class MPImageProvider extends java.lang.Object implements ImageProvider
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clears stored results and pending tasksstatic MPImageProvider
get()
Retrieves the MPImageProvider instancevoid
loadImageAsync(java.lang.String imageUrl, OnSingleImageLoadedListener listener)
Loads a single image by callingloadImageAsync(String, OnSingleImageLoadedListener)
void
loadImagesAsync(java.util.List<java.lang.String> imageUrlList, OnMultipleImagesLoadedListener listener)
Loads multiple images Checks if the image has already been loaded and avoids loading it again.void
terminate()
Clears stored results and pending tasks
-
-
-
Method Detail
-
get
@NonNull public static MPImageProvider get()
Retrieves the MPImageProvider instance- Returns:
- The singleton
-
loadImageAsync
public void loadImageAsync(@NonNull java.lang.String imageUrl, @NonNull OnSingleImageLoadedListener listener)
Loads a single image by callingloadImageAsync(String, OnSingleImageLoadedListener)
- Specified by:
loadImageAsync
in interfaceImageProvider
- Parameters:
imageUrl
- An image URLlistener
- An optional callback
-
loadImagesAsync
public void loadImagesAsync(@NonNull java.util.List<java.lang.String> imageUrlList, @NonNull OnMultipleImagesLoadedListener listener)
Loads multiple images Checks if the image has already been loaded and avoids loading it again.- Specified by:
loadImagesAsync
in interfaceImageProvider
- Parameters:
imageUrlList
- A list of image URLslistener
- An optional callback
-
clearCache
public void clearCache()
Clears stored results and pending tasks- Specified by:
clearCache
in interfaceImageProvider
-
terminate
public void terminate()
Clears stored results and pending tasks- Specified by:
terminate
in interfaceImageProvider
-
-