MapKit Mobile SDK
  • About MapKit
  • Android
    • Getting started
    • Tutorials
    • Class references
      • world.mappable.mapkit
      • world.mappable.mapkit.annotations
      • world.mappable.mapkit.directions
      • world.mappable.mapkit.directions.driving
      • world.mappable.mapkit.geometry
      • world.mappable.mapkit.geometry.geo
      • world.mappable.mapkit.images
      • world.mappable.mapkit.layers
      • world.mappable.mapkit.location
      • world.mappable.mapkit.logo
      • world.mappable.mapkit.map
      • world.mappable.mapkit.mapview
      • world.mappable.mapkit.navigation
      • world.mappable.mapkit.navigation.automotive
      • world.mappable.mapkit.navigation.automotive.custom_route_navigation
      • world.mappable.mapkit.navigation.automotive.layer
      • world.mappable.mapkit.navigation.automotive.layer.styling
      • world.mappable.mapkit.navigation.automotive.simulation
      • world.mappable.mapkit.navigation.balloons
      • world.mappable.mapkit.navigation.guidance_camera
      • world.mappable.mapkit.offline_cache
      • world.mappable.mapkit.personalized_poi
      • world.mappable.mapkit.places
      • world.mappable.mapkit.places.mrc
      • world.mappable.mapkit.places.panorama
      • world.mappable.mapkit.road_events
      • world.mappable.mapkit.road_events_layer
      • world.mappable.mapkit.search
      • world.mappable.mapkit.search.search_layer
      • world.mappable.mapkit.storage
      • world.mappable.mapkit.styling
      • world.mappable.mapkit.tiles
      • world.mappable.mapkit.traffic
      • world.mappable.mapkit.transport
      • world.mappable.mapkit.transport.bicycle
      • world.mappable.mapkit.transport.masstransit
      • world.mappable.mapkit.transport.time
      • world.mappable.mapkit.uri
      • world.mappable.mapkit.user_location
      • world.mappable.runtime
      • world.mappable.runtime.config
      • world.mappable.runtime.i18n
      • world.mappable.runtime.image
      • world.mappable.runtime.network
      • world.mappable.runtime.ui_view
      • world.mappable.runtime.view
  • iOS
  • Flutter
  • Map styles
  • Technical support

Package world.mappable.runtime.image

Class ImageProvider

java.lang.Object
    ↳ world.mappable.runtime.image.ImageProvider

abstract class ImageProvider

Provides Bitmap objects from different input sources.

Extend this class to provide images from custom sources.

Summary

Constructors

Signature and Description

ImageProvider()

ImageProvider(boolean cacheable)

Methods

Type and modifiers

Method and Description

boolean

isCacheable()
Determines whether image should be cached on GPU or not.

abstract java.lang.String

getId()
Returns the unique identifier for an image.

abstract android.graphics.Bitmap

getImage()
Returns the image in bitmap format.

static ImageProvider

fromBitmap(android.graphics.Bitmap bitmap)

static ImageProvider

fromBitmap(android.graphics.Bitmap bitmap,
           boolean cacheable,
           java.lang.String id)

Returns the image provider based on a given bitmap.

static ImageProvider

fromAsset(android.content.Context context,
          java.lang.String assetName)

static ImageProvider

fromAsset(android.content.Context context,
          java.lang.String assetName,
          boolean cacheable)

Returns the image provider based on a given asset (from the assets/ folder).

static ImageProvider

fromResource(android.content.Context context,
             int resourceId)

static ImageProvider

fromResource(android.content.Context context,
             int resourceId,
             boolean cacheable)

Returns the image provider based on an application resource (from the res/ folder).

static ImageProvider

fromFile(java.lang.String fileName)

static ImageProvider

fromFile(java.lang.String fileName,
         boolean cacheable)

Returns the image provider based on an image file from the internal storage.

Constuctors

ImageProvider

ImageProvider()


ImageProvider

ImageProvider(boolean cacheable)


Methods

isCacheable

boolean isCacheable()

Determines whether image should be cached on GPU or not.


getId

java.lang.String getId()

Returns the unique identifier for an image.

Providers can be cached based on it.


getImage

android.graphics.Bitmap getImage()

Returns the image in bitmap format.


fromBitmap

ImageProvider fromBitmap(android.graphics.Bitmap bitmap)


fromBitmap

ImageProvider fromBitmap(android.graphics.Bitmap bitmap,
                         boolean cacheable,
                         java.lang.String id)

Returns the image provider based on a given bitmap.


fromAsset

ImageProvider fromAsset(android.content.Context context,
                        java.lang.String assetName)


fromAsset

ImageProvider fromAsset(android.content.Context context,
                        java.lang.String assetName,
                        boolean cacheable)

Returns the image provider based on a given asset (from the assets/ folder).


fromResource

ImageProvider fromResource(android.content.Context context,
                           int resourceId)


fromResource

ImageProvider fromResource(android.content.Context context,
                           int resourceId,
                           boolean cacheable)

Returns the image provider based on an application resource (from the res/ folder).


fromFile

ImageProvider fromFile(java.lang.String fileName)


fromFile

ImageProvider fromFile(java.lang.String fileName,
                       boolean cacheable)

Returns the image provider based on an image file from the internal storage.