Class IconFactory

java.lang.Object
com.trimblemaps.mapsdk.annotations.IconFactory

@Deprecated public final class IconFactory extends Object
Deprecated.
Use TrimbleMaps Annotation Plugin instead instead
Factory for creating Icons from bitmap images.

icon is used to display bitmaps on top of the map using Marker.

  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Provides an icon using the default marker icon used for Marker.
    fromAsset(String assetName)
    Deprecated.
    Creates an Icon using the name of a Bitmap image in the assets directory.
    fromBitmap(android.graphics.Bitmap bitmap)
    Deprecated.
    Creates an icon from a given Bitmap image.
    fromFile(String fileName)
    Deprecated.
    Create an Icon using the name of a Bitmap image file located in the internal storage.
    fromPath(String absolutePath)
    Deprecated.
    Creates an Icon using the absolute file path of a Bitmap image.
    fromResource(int resourceId)
    Deprecated.
    Creates an icon using the resource ID of a Bitmap image.
    getInstance(android.content.Context context)
    Deprecated.
    Get a single instance of IconFactory.
    static Icon
    recreate(String iconId, android.graphics.Bitmap bitmap)
    Deprecated.
    Create an Icon using a previously created icon identifier along with a provided Bitmap.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getInstance

      public static IconFactory getInstance(@NonNull android.content.Context context)
      Deprecated.
      Get a single instance of IconFactory.
      Parameters:
      context - the context to derive the application context from
      Returns:
      the single instance of IconFactory
    • fromBitmap

      public Icon fromBitmap(@NonNull android.graphics.Bitmap bitmap)
      Deprecated.
      Creates an icon from a given Bitmap image.
      Parameters:
      bitmap - image used for creating the Icon.
      Returns:
      The icon using the given Bitmap image.
    • fromResource

      public Icon fromResource(@DrawableRes int resourceId)
      Deprecated.
      Creates an icon using the resource ID of a Bitmap image.
      Parameters:
      resourceId - The resource ID of a Bitmap image.
      Returns:
      The icon that was loaded from the asset or null if failed to load.
    • defaultMarker

      public Icon defaultMarker()
      Deprecated.
      Provides an icon using the default marker icon used for Marker.
      Returns:
      An icon with the default Marker icon.
    • fromAsset

      public Icon fromAsset(@NonNull String assetName)
      Deprecated.
      Creates an Icon using the name of a Bitmap image in the assets directory.
      Parameters:
      assetName - The name of a Bitmap image in the assets directory.
      Returns:
      The Icon that was loaded from the asset or null if failed to load.
    • fromPath

      public Icon fromPath(@NonNull String absolutePath)
      Deprecated.
      Creates an Icon using the absolute file path of a Bitmap image.
      Parameters:
      absolutePath - The absolute path of the Bitmap image.
      Returns:
      The Icon that was loaded from the absolute path or null if failed to load.
    • fromFile

      public Icon fromFile(@NonNull String fileName)
      Deprecated.
      Create an Icon using the name of a Bitmap image file located in the internal storage. In particular, this calls Context#openFileInput(String).
      Parameters:
      fileName - The name of the Bitmap image file.
      Returns:
      The Icon that was loaded from the asset or null if failed to load.
      See Also:
    • recreate

      public static Icon recreate(@NonNull String iconId, @NonNull android.graphics.Bitmap bitmap)
      Deprecated.
      Create an Icon using a previously created icon identifier along with a provided Bitmap.
      Parameters:
      iconId - The Icon identifier you'd like to recreate.
      bitmap - a Bitmap used to replace the current one.
      Returns:
      The Icon using the new Bitmap.