Package globus.glmap

Class GLMapMarkerStyleCollection


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

      • GLMapMarkerStyleCollection

        public GLMapMarkerStyleCollection()
    • Method Detail

      • 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
      • setStyleName

        public void setStyleName​(int styleIndex,
                                 java.lang.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
                                         java.lang.String text,
                                         @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
        offset - offset of text from marker location
        style - style to use for text