Package globus.glmap
Class GLMapMarkerStyleCollection
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapMarkerStyleCollection
GLMapMarkerStyleCollection
holds collection of styles, used to draw marker layer.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
addStyle
(GLMapMarkerImage image) Adds new style to collectionint
addStyle
(GLMapMarkerImage[] images) Adds new style to collectionint
addStyle
(GLMapMarkerImage[] images, GLMapVectorStyle textStyle, android.graphics.Point textOffset) Adds new style to collectionint
addStyle
(GLMapMarkerImage image, GLMapVectorStyle textStyle, android.graphics.Point textOffset) Adds new style to collectionvoid
setDataCallback
(GLMapMarkerStyleCollectionDataCallback dataCallback) Sets dataCallback that will be used by markerLayer to get display information about markersstatic void
setMarkerStyle
(long nativeMarkerObject, int style) Sets style of marker.static void
setMarkerText
(long nativeMarkerObject, String text, int textAlignment, android.graphics.Point offset, GLMapVectorStyle style) Sets text for marker.void
setStyleName
(int styleIndex, String name) Sets name for style that can be used from MapCSSMethods inherited from class globus.glmap.GLNativeObject
dispose
-
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 markertextOffset
- offset of text from marker locationtextStyle
- style to use for text- Returns:
- index in collection for this style
-
addStyle
Adds new style to collection- Parameters:
images
- array of images to display for marker- Returns:
- index in collection for this style
-
addStyle
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 markertextStyle
- text style for markertextOffset
- text offset- Returns:
- index in collection for this style
-
setStyleName
Sets name for style that can be used from MapCSS- Parameters:
styleIndex
- index of stylename
- name to set
-
setDataCallback
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 fromGLMapMarkerStyleCollectionDataCallback
- Parameters:
nativeMarkerObject
- native marker object that was passed as argument toGLMapMarkerStyleCollectionDataCallback
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 fromGLMapMarkerStyleCollectionDataCallback
- Parameters:
nativeMarkerObject
- native marker object that was passed as argument toGLMapMarkerStyleCollectionDataCallback
*text
- text to settextAlignment
- alignment of textoffset
- offset of text from marker locationstyle
- style to use for text
-