Class SymbolOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonElementgetData()Get the arbitrary json data of the annotation.booleanReturns whether this symbol is draggable, meaning it can be dragged across the screen when touched and moved.com.trimblemaps.geojson.PointGet the geometry of the symbol, which represents the location of the symbol on the mapGet the current configured icon-anchor for the symbolGet the current configured icon-color for the symbolGet the current configured icon-halo-blur for the symbolGet the current configured icon-halo-color for the symbolGet the current configured icon-halo-width for the symbolGet the current configured icon-image for the symbolFloat[]Get the current configured icon-offset for the symbolGet the current configured icon-opacity for the symbolGet the current configured icon-rotate for the symbolGet the current configured icon-size for the symbolcom.trimblemaps.mapsdk.geometry.LatLngGet the LatLng of the symbol, which represents the location of the symbol on the mapGet the current configured symbol-sort-key for the symbolGet the current configured text-anchor for the symbolGet the current configured text-color for the symbolGet the current configured text-field for the symbolString[]Get the current configured text-font for the symbolGet the current configured text-halo-blur for the symbolGet the current configured text-halo-color for the symbolGet the current configured text-halo-width for the symbolGet the current configured text-justify for the symbolGet the current configured text-letter-spacing for the symbolGet the current configured text-max-width for the symbolFloat[]Get the current configured text-offset for the symbolGet the current configured text-opacity for the symbolGet the current configured text-radial-offset for the symbolGet the current configured text-rotate for the symbolGet the current configured text-size for the symbolGet the current configured text-transform for the symbolwithData(com.google.gson.JsonElement jsonElement) Set the arbitrary json data of the annotation.withDraggable(boolean draggable) Set whether this symbol should be draggable, meaning it can be dragged across the screen when touched and moved.withGeometry(com.trimblemaps.geojson.Point geometry) Set the geometry of the symbol, which represents the location of the symbol on the mapwithIconAnchor(String iconAnchor) Set icon-anchor to initialise the symbol with.withIconColor(String iconColor) Set icon-color to initialise the symbol with.withIconHaloBlur(Float iconHaloBlur) Set icon-halo-blur to initialise the symbol with.withIconHaloColor(String iconHaloColor) Set icon-halo-color to initialise the symbol with.withIconHaloWidth(Float iconHaloWidth) Set icon-halo-width to initialise the symbol with.withIconImage(String iconImage) Set icon-image to initialise the symbol with.withIconOffset(Float[] iconOffset) Set icon-offset to initialise the symbol with.withIconOpacity(Float iconOpacity) Set icon-opacity to initialise the symbol with.withIconRotate(Float iconRotate) Set icon-rotate to initialise the symbol with.withIconSize(Float iconSize) Set icon-size to initialise the symbol with.withLatLng(com.trimblemaps.mapsdk.geometry.LatLng latLng) Set the LatLng of the symbol, which represents the location of the symbol on the mapwithSymbolSortKey(Float symbolSortKey) Set symbol-sort-key to initialise the symbol with.withTextAnchor(String textAnchor) Set text-anchor to initialise the symbol with.withTextColor(String textColor) Set text-color to initialise the symbol with.withTextField(String textField) Set text-field to initialise the symbol with.withTextFont(String[] textFont) Set text-font to initialise the symbol with.withTextHaloBlur(Float textHaloBlur) Set text-halo-blur to initialise the symbol with.withTextHaloColor(String textHaloColor) Set text-halo-color to initialise the symbol with.withTextHaloWidth(Float textHaloWidth) Set text-halo-width to initialise the symbol with.withTextJustify(String textJustify) Set text-justify to initialise the symbol with.withTextLetterSpacing(Float textLetterSpacing) Set text-letter-spacing to initialise the symbol with.withTextMaxWidth(Float textMaxWidth) Set text-max-width to initialise the symbol with.withTextOffset(Float[] textOffset) Set text-offset to initialise the symbol with.withTextOpacity(Float textOpacity) Set text-opacity to initialise the symbol with.withTextRadialOffset(Float textRadialOffset) Set text-radial-offset to initialise the symbol with.withTextRotate(Float textRotate) Set text-rotate to initialise the symbol with.withTextSize(Float textSize) Set text-size to initialise the symbol with.withTextTransform(String textTransform) Set text-transform to initialise the symbol with.
-
Constructor Details
-
SymbolOptions
public SymbolOptions()
-
-
Method Details
-
withSymbolSortKey
Set symbol-sort-key to initialise the symbol with.Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement.
- Parameters:
symbolSortKey- the symbol-sort-key value- Returns:
- this
-
getSymbolSortKey
Get the current configured symbol-sort-key for the symbolSorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key when they overlap. Features with a lower sort key will have priority over other features when doing placement.
- Returns:
- symbolSortKey value
-
withIconSize
Set icon-size to initialise the symbol with.Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by
PropertyFactory.iconSize(java.lang.Float). 1 is the original size; 3 triples the size of the image.- Parameters:
iconSize- the icon-size value- Returns:
- this
-
getIconSize
Get the current configured icon-size for the symbolScales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by
PropertyFactory.iconSize(java.lang.Float). 1 is the original size; 3 triples the size of the image.- Returns:
- iconSize value
-
withIconImage
Set icon-image to initialise the symbol with.Name of image in sprite to use for drawing an image background.
- Parameters:
iconImage- the icon-image value- Returns:
- this
-
getIconImage
Get the current configured icon-image for the symbolName of image in sprite to use for drawing an image background.
- Returns:
- iconImage value
-
withIconRotate
Set icon-rotate to initialise the symbol with.Rotates the icon clockwise.
- Parameters:
iconRotate- the icon-rotate value- Returns:
- this
-
getIconRotate
Get the current configured icon-rotate for the symbolRotates the icon clockwise.
- Returns:
- iconRotate value
-
withIconOffset
Set icon-offset to initialise the symbol with.Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of
PropertyFactory.iconSize(java.lang.Float)to obtain the final offset in density-independent pixels. When combined withPropertyFactory.iconRotate(java.lang.Float)the offset will be as if the rotated direction was up.- Parameters:
iconOffset- the icon-offset value- Returns:
- this
-
getIconOffset
Get the current configured icon-offset for the symbolOffset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of
PropertyFactory.iconSize(java.lang.Float)to obtain the final offset in density-independent pixels. When combined withPropertyFactory.iconRotate(java.lang.Float)the offset will be as if the rotated direction was up.- Returns:
- iconOffset value
-
withIconAnchor
Set icon-anchor to initialise the symbol with.Part of the icon placed closest to the anchor.
- Parameters:
iconAnchor- the icon-anchor value- Returns:
- this
-
getIconAnchor
Get the current configured icon-anchor for the symbolPart of the icon placed closest to the anchor.
- Returns:
- iconAnchor value
-
withTextField
Set text-field to initialise the symbol with.Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.
- Parameters:
textField- the text-field value- Returns:
- this
-
getTextField
Get the current configured text-field for the symbolValue to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.
- Returns:
- textField value
-
withTextFont
Set text-font to initialise the symbol with.Font stack to use for displaying text.
- Parameters:
textFont- the text-font value- Returns:
- this
-
getTextFont
Get the current configured text-font for the symbolFont stack to use for displaying text.
- Returns:
- textFont value
-
withTextSize
Set text-size to initialise the symbol with.Font size.
- Parameters:
textSize- the text-size value- Returns:
- this
-
getTextSize
Get the current configured text-size for the symbolFont size.
- Returns:
- textSize value
-
withTextMaxWidth
Set text-max-width to initialise the symbol with.The maximum line width for text wrapping.
- Parameters:
textMaxWidth- the text-max-width value- Returns:
- this
-
getTextMaxWidth
Get the current configured text-max-width for the symbolThe maximum line width for text wrapping.
- Returns:
- textMaxWidth value
-
withTextLetterSpacing
Set text-letter-spacing to initialise the symbol with.Text tracking amount.
- Parameters:
textLetterSpacing- the text-letter-spacing value- Returns:
- this
-
getTextLetterSpacing
Get the current configured text-letter-spacing for the symbolText tracking amount.
- Returns:
- textLetterSpacing value
-
withTextJustify
Set text-justify to initialise the symbol with.Text justification options.
- Parameters:
textJustify- the text-justify value- Returns:
- this
-
getTextJustify
Get the current configured text-justify for the symbolText justification options.
- Returns:
- textJustify value
-
withTextRadialOffset
Set text-radial-offset to initialise the symbol with.Radial offset of text, in the direction of the symbol's anchor. Useful in combination with
PropertyFactory.textVariableAnchor(java.lang.String[]), which doesn't support the two-dimensionalPropertyFactory.textOffset(java.lang.Float[]).- Parameters:
textRadialOffset- the text-radial-offset value- Returns:
- this
-
getTextRadialOffset
Get the current configured text-radial-offset for the symbolRadial offset of text, in the direction of the symbol's anchor. Useful in combination with
PropertyFactory.textVariableAnchor(java.lang.String[]), which doesn't support the two-dimensionalPropertyFactory.textOffset(java.lang.Float[]).- Returns:
- textRadialOffset value
-
withTextAnchor
Set text-anchor to initialise the symbol with.Part of the text placed closest to the anchor.
- Parameters:
textAnchor- the text-anchor value- Returns:
- this
-
getTextAnchor
Get the current configured text-anchor for the symbolPart of the text placed closest to the anchor.
- Returns:
- textAnchor value
-
withTextRotate
Set text-rotate to initialise the symbol with.Rotates the text clockwise.
- Parameters:
textRotate- the text-rotate value- Returns:
- this
-
getTextRotate
Get the current configured text-rotate for the symbolRotates the text clockwise.
- Returns:
- textRotate value
-
withTextTransform
Set text-transform to initialise the symbol with.Specifies how to capitalize text, similar to the CSS
PropertyFactory.textTransform(java.lang.String)property.- Parameters:
textTransform- the text-transform value- Returns:
- this
-
getTextTransform
Get the current configured text-transform for the symbolSpecifies how to capitalize text, similar to the CSS
PropertyFactory.textTransform(java.lang.String)property.- Returns:
- textTransform value
-
withTextOffset
Set text-offset to initialise the symbol with.Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.
- Parameters:
textOffset- the text-offset value- Returns:
- this
-
getTextOffset
Get the current configured text-offset for the symbolOffset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up.
- Returns:
- textOffset value
-
withIconOpacity
Set icon-opacity to initialise the symbol with.The opacity at which the icon will be drawn.
- Parameters:
iconOpacity- the icon-opacity value- Returns:
- this
-
getIconOpacity
Get the current configured icon-opacity for the symbolThe opacity at which the icon will be drawn.
- Returns:
- iconOpacity value
-
withIconColor
Set icon-color to initialise the symbol with.The color of the icon. This can only be used with sdf icons.
- Parameters:
iconColor- the icon-color value- Returns:
- this
-
getIconColor
Get the current configured icon-color for the symbolThe color of the icon. This can only be used with sdf icons.
- Returns:
- iconColor value
-
withIconHaloColor
Set icon-halo-color to initialise the symbol with.The color of the icon's halo. Icon halos can only be used with SDF icons.
- Parameters:
iconHaloColor- the icon-halo-color value- Returns:
- this
-
getIconHaloColor
Get the current configured icon-halo-color for the symbolThe color of the icon's halo. Icon halos can only be used with SDF icons.
- Returns:
- iconHaloColor value
-
withIconHaloWidth
Set icon-halo-width to initialise the symbol with.Distance of halo to the icon outline.
- Parameters:
iconHaloWidth- the icon-halo-width value- Returns:
- this
-
getIconHaloWidth
Get the current configured icon-halo-width for the symbolDistance of halo to the icon outline.
- Returns:
- iconHaloWidth value
-
withIconHaloBlur
Set icon-halo-blur to initialise the symbol with.Fade out the halo towards the outside.
- Parameters:
iconHaloBlur- the icon-halo-blur value- Returns:
- this
-
getIconHaloBlur
Get the current configured icon-halo-blur for the symbolFade out the halo towards the outside.
- Returns:
- iconHaloBlur value
-
withTextOpacity
Set text-opacity to initialise the symbol with.The opacity at which the text will be drawn.
- Parameters:
textOpacity- the text-opacity value- Returns:
- this
-
getTextOpacity
Get the current configured text-opacity for the symbolThe opacity at which the text will be drawn.
- Returns:
- textOpacity value
-
withTextColor
Set text-color to initialise the symbol with.The color with which the text will be drawn.
- Parameters:
textColor- the text-color value- Returns:
- this
-
getTextColor
Get the current configured text-color for the symbolThe color with which the text will be drawn.
- Returns:
- textColor value
-
withTextHaloColor
Set text-halo-color to initialise the symbol with.The color of the text's halo, which helps it stand out from backgrounds.
- Parameters:
textHaloColor- the text-halo-color value- Returns:
- this
-
getTextHaloColor
Get the current configured text-halo-color for the symbolThe color of the text's halo, which helps it stand out from backgrounds.
- Returns:
- textHaloColor value
-
withTextHaloWidth
Set text-halo-width to initialise the symbol with.Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.
- Parameters:
textHaloWidth- the text-halo-width value- Returns:
- this
-
getTextHaloWidth
Get the current configured text-halo-width for the symbolDistance of halo to the font outline. Max text halo width is 1/4 of the font-size.
- Returns:
- textHaloWidth value
-
withTextHaloBlur
Set text-halo-blur to initialise the symbol with.The halo's fadeout distance towards the outside.
- Parameters:
textHaloBlur- the text-halo-blur value- Returns:
- this
-
getTextHaloBlur
Get the current configured text-halo-blur for the symbolThe halo's fadeout distance towards the outside.
- Returns:
- textHaloBlur value
-
withLatLng
Set the LatLng of the symbol, which represents the location of the symbol on the map- Parameters:
latLng- the location of the symbol in a longitude and latitude pair- Returns:
- this
-
getLatLng
public com.trimblemaps.mapsdk.geometry.LatLng getLatLng()Get the LatLng of the symbol, which represents the location of the symbol on the map- Returns:
- the location of the symbol in a longitude and latitude pair
-
withGeometry
Set the geometry of the symbol, which represents the location of the symbol on the map- Parameters:
geometry- the location of the symbol- Returns:
- this
-
getGeometry
public com.trimblemaps.geojson.Point getGeometry()Get the geometry of the symbol, which represents the location of the symbol on the map- Returns:
- the location of the symbol
-
getDraggable
public boolean getDraggable()Returns whether this symbol is draggable, meaning it can be dragged across the screen when touched and moved.- Returns:
- draggable when touched
-
withDraggable
Set whether this symbol should be draggable, meaning it can be dragged across the screen when touched and moved.- Parameters:
draggable- should be draggable
-
withData
Set the arbitrary json data of the annotation.- Parameters:
jsonElement- the arbitrary json element data
-
getData
@Nullable public com.google.gson.JsonElement getData()Get the arbitrary json data of the annotation.- Returns:
- the arbitrary json object data if set, else null
-