Package globus.glmap

Class GLMapMarkerStyleCollection

java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapMarkerStyleCollection

public class GLMapMarkerStyleCollection extends GLNativeObject
GLMapMarkerStyleCollection holds collection of styles, used to draw marker layer.
  • Constructor Details

    • GLMapMarkerStyleCollection

      public GLMapMarkerStyleCollection()
      Default constructor
  • Method Details

    • addStyle

      public int addStyle(@NonNull GLMapMarkerImage[] images, @Nullable GLMapVectorStyle textStyle, @Nullable android.graphics.Point textOffset)
      Adds new style to collection
      Parameters:
      images - array of images to display for marker
      textOffset - offset of text from marker location
      textStyle - style to use for text
      Returns:
      index in collection for this style
    • addStyle

      public int addStyle(@NonNull GLMapMarkerImage[] images)
      Adds new style to collection
      Parameters:
      images - array of images to display for marker
      Returns:
      index in collection for this style
    • addStyle

      public int addStyle(@NonNull GLMapMarkerImage image)
      Adds new style to collection
      Parameters:
      image - image to display for marker
      Returns:
      index in collection for this style
    • addStyle

      public int addStyle(@NonNull GLMapMarkerImage image, @NonNull GLMapVectorStyle textStyle, @NonNull android.graphics.Point textOffset)
      Adds new style to collection
      Parameters:
      image - image to display for marker
      textStyle - text style for marker
      textOffset - text offset
      Returns:
      index in collection for this style
    • setStyleName

      public void setStyleName(int styleIndex, String name)
      Sets name for style that can be used from MapCSS
      Parameters:
      styleIndex - index of style
      name - name to set
    • setDataCallback

      public void setDataCallback(@NonNull GLMapMarkerStyleCollectionDataCallback dataCallback)
      Sets dataCallback that will be used by markerLayer to get display information about markers
      Parameters:
      dataCallback - callback that will be used to get display information about markers
    • setMarkerStyle

      public static void setMarkerStyle(long nativeMarkerObject, int style)
      Sets style of marker. Must be called from GLMapMarkerStyleCollectionDataCallback
      Parameters:
      nativeMarkerObject - native marker object that was passed as argument to GLMapMarkerStyleCollectionDataCallback
      style - style of marker to use
    • setMarkerText

      public static void setMarkerText(long nativeMarkerObject, @NonNull String text, int textAlignment, @Nullable android.graphics.Point offset, GLMapVectorStyle style)
      Sets text for marker. Must be called from GLMapMarkerStyleCollectionDataCallback
      Parameters:
      nativeMarkerObject - native marker object that was passed as argument to GLMapMarkerStyleCollectionDataCallback*
      text - text to set
      textAlignment - alignment of text
      offset - offset of text from marker location
      style - style to use for text