MarkerSymbol

sealed class MarkerSymbol : Symbol

A base class for marker symbols used to display graphics and features (collectively referred to as geoelements) that have points or multipoint geometry. Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Marker symbols are used to display graphics and features that are based on point or multipoint geometries such as cities, a route destination, or fire hydrants. Subclasses of this class represent specific types of marker symbols such as SimpleMarkerSymbol, PictureMarkerSymbol, or TextSymbol.

You can specify the following two types of offsets:

  • Offset the visible symbol from the symbol's point geometry.

  • Offset a callout's leader line from the symbol's point geometry.

For each offset, you can specify an x-offset and a y-offset in device independent pixels (DIPs) using a Cartesian coordinate system. For example, if you specify a callout x-offset of -5.0, the callout's leader line will offset to the left along the x-axis by five points.

By default, the center of a PictureMarkerSymbol.image is placed at the Point location. If the image is a pushpin, for example, you may want the needle of the pushpin to end at the Point location. In this situation, you need to offset the symbol to make the needle's end coincide with that Point location.

You can control the rotation of the marker symbol using the MarkerSymbol.angle. However, you must also consider whether this rotation is relative to the map or screen (MarkerSymbol.angleAlignment).

Since

200.1.0

Inheritors

Properties

Link copied to clipboard

The angle (in degrees) that the marker symbol is rotated by. The marker symbol can be rotated relative to the map or the screen, depending on the MarkerSymbol.angleAlignment.

Link copied to clipboard

Indicates whether the marker symbol is rotated relative to the screen or map. If the value is SymbolAngleAlignment.Map, the marker symbol is rotated relative to the map and will be affected by the map's rotation. If the value is SymbolAngleAlignment.Screen, the marker symbol is rotated relative to the user's screen and is unaffected by the map's rotation.

Link copied to clipboard

The callout leader's X offset relative to the marker symbol.

Link copied to clipboard

The callout leader's Y offset relative to the marker symbol.

Link copied to clipboard

The offset X of the marker symbol relative to the graphic or feature's point geometry.

Link copied to clipboard

The offset Y of the marker symbol relative to the graphic or feature's point geometry.

Functions

Link copied to clipboard
open override fun clone(): MarkerSymbol

Clones the MarkerSymbol.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Inherited functions

Link copied to clipboard
suspend fun createSwatch(screenScale: Float, width: Float? = null, height: Float? = null, backgroundColor: Color = Color.transparent): Result<BitmapDrawable>

Creates a swatch of the symbol. This method will scale the symbol up or down in order to fit it in to the desired width and height of the swatch.

suspend fun createSwatch(screenScale: Float, width: Float, height: Float, geometry: Geometry, backgroundColor: Color = Color.transparent): Result<BitmapDrawable>

Creates a swatch of the symbol.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toJson(): String

Convert an object to JSON string.