PlacemarkAttributes

open class PlacemarkAttributes(var imageSource: ImageSource?, imageColor: Color, imageOffset: Offset, var imageScaleX: Double, var imageScaleY: Double, var minimumImageScale: Double, var isDrawLabel: Boolean, var isDrawLeader: Boolean, var isDepthTest: Boolean, labelAttributes: TextAttributes, leaderAttributes: ShapeAttributes)

Holds attributes applied to Placemark shapes. The defaults indicate a placemark displayed as a white 1x1 pixel square centered on the placemark's geographic position.

Constructors

Link copied to clipboard
constructor(imageSource: ImageSource?, imageColor: Color, imageOffset: Offset, imageScaleX: Double, imageScaleY: Double, minimumImageScale: Double, isDrawLabel: Boolean, isDrawLeader: Boolean, isDepthTest: Boolean, labelAttributes: TextAttributes, leaderAttributes: ShapeAttributes)
constructor()

Constructs a placemark attributes bundle. The defaults indicate a placemark displayed as a white 1x1 pixel square centered on the placemark's geographic position.

constructor(attributes: PlacemarkAttributes)

Constructs a placemark attribute bundle from the specified attributes. Performs a deep copy of the color, offset, label attributes and leader-line attributes.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns the image color. When this attribute bundle has a valid image path the placemark's image is composed with this image color to achieve the final placemark color. Otherwise, the placemark is drawn in this color. The color white, the default, causes the image to be drawn in its native colors.

Link copied to clipboard

Returns the location within the placemark's image to align with the placemark's geographic position. The default value centers the image at the geographic position.

Link copied to clipboard

Convenience uniform-scale accessor. Getting reads imageScaleY (the historic "imageScale" semantics); setting writes BOTH imageScaleX and imageScaleY so existing call sites that treat scale as uniform keep working unchanged.

Link copied to clipboard

Horizontal multiplier applied to the placemark's image. Together with imageScaleY defines the on-screen extent of the image quad in pixels. Set both to the same value for uniform scaling — the convenience imageScale property does that in one step. Use a different X than Y when you need to stretch horizontally (highway shields, pill-shaped badges fitting variable-length text — icon-text-fit: width).

Link copied to clipboard

Vertical multiplier applied to the placemark's image. See imageScaleX.

Link copied to clipboard

Returns the source of the placemark's image. If null, the placemark is drawn as a square whose side is the larger of this attribute object's imageScaleX and imageScaleY values.

Link copied to clipboard

Returns whether the placemark should be depth-tested against other objects in the scene. If true, the placemark may be occluded by terrain and other objects in certain viewing situations. If false, the placemark will not be occluded by terrain and other objects. If this value is true, the placemark's label, if any, has an independent depth-test control.

Link copied to clipboard

Returns whether to draw a placemark's label text.

Link copied to clipboard

Returns whether to draw a line from the placemark's geographic position to the ground.

Link copied to clipboard

Returns the attributes to apply to the placemark's label

Link copied to clipboard

Returns the attributes to apply to the leader line if it's drawn.

Link copied to clipboard

Returns the minimum amount to scale the placemark's image. When a Placemark.isEyeDistanceScaling is true, this value controls the minimum size of the rendered placemark. A value of 0 allows the placemark to disappear.

Functions

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