Placemark

open class Placemark @JvmOverloads constructor(position: Position, var attributes: PlacemarkAttributes = PlacemarkAttributes(), var label: String? = null) : AbstractRenderable, Highlightable, Movable

Represents a Placemark shape. A placemark displays an image, a label and a leader connecting the placemark's geographic position to the ground. All three of these items are optional. By default, the leader is not pickable. See Placemark.isLeaderPickingEnabled.
Placemarks may be drawn with either an image or as single-color square with a specified size. When the placemark attributes indicate a valid image, the placemark's image is drawn as a rectangle in the image's original dimensions, scaled by the image scale attribute. Otherwise, the placemark is drawn as a square with width and height equal to the value of the image scale attribute, in pixels, and color equal to the image color attribute.

Inheritors

Constructors

Link copied to clipboard
constructor(position: Position, attributes: PlacemarkAttributes = PlacemarkAttributes(), label: String? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Presents an interfaced for dynamically determining the PlacemarkAttributes based on the distance between the placemark and the camera.

Properties

Link copied to clipboard
open override var altitudeMode: AltitudeMode

The placemark's altitude mode. See AltitudeMode

Link copied to clipboard

The placemark's normal attributes.

Link copied to clipboard
open override var displayName: String?
Link copied to clipboard

Sets the eye altitude, in meters, above which this placemark's label is not displayed.

Link copied to clipboard

Sets the eye distance above which to reduce the size of this placemark, in meters. If isEyeDistanceScaling is true, this placemark's image, label and leader sizes are reduced as the eye distance increases beyond this threshold.

Link copied to clipboard

The attributes to use when the placemark is highlighted.

Link copied to clipboard

The amount of rotation to apply to the image, measured clockwise and relative to this placemark's Placemark.imageRotationReference.

Link copied to clipboard

eyeDistanceScaling Sets the type of rotation to apply if the Placemark.imageRotation is not zero. This value indicates whether to apply this placemark's image rotation relative to the screen or the globe.
If OrientationMode.RELATIVE_TO_SCREEN, this placemark's image is rotated in the plane of the screen and its orientation relative to the globe changes as the view changes. If OrientationMode.RELATIVE_TO_GLOBE, this placemark's image is rotated in a plane tangent to the globe at this placemark's position and retains its orientation relative to the globe.

Link copied to clipboard

Sets the amount of tilt to apply to the image, measured away from the eye point and relative to this placemark's Placemark.imageTiltReference. While any positive or negative number may be specified, values outside the range 0. 90 cause some or all of the image to be clipped.

Link copied to clipboard

Sets the type tilt to apply when Placemark.imageTilt is non-zero. This value indicates whether to apply this placemark's image tilt relative to the screen or the globe.
If OrientationMode.RELATIVE_TO_SCREEN, this placemark's image is tilted inwards (for positive tilts) relative to the plane of the screen, and its orientation relative to the globe changes as the view changes. If OrientationMode.RELATIVE_TO_GLOBE, this placemark's image is tilted towards the globe's surface, and retains its orientation relative to the surface.

Link copied to clipboard

Indicates whether this placemark has visual priority over other shapes in the scene.

Link copied to clipboard

Enable additional altitude offset (billboarding) to prevent clipping Placamerk by terrain on tilt.

Link copied to clipboard
open override var isEnabled: Boolean
Link copied to clipboard

Enables or disables the eye distance scaling feature for this placemark. When enabled, the placemark's size is reduced at higher eye distances. If true, this placemark's size is scaled inversely proportional to the eye distance if the eye distance is greater than the value of the Placemark.eyeDistanceScalingThreshold property. When the eye distance is below the threshold, this placemark is scaled only according to the PlacemarkAttributes.imageScaleX / PlacemarkAttributes.imageScaleY.

Link copied to clipboard
open override var isHighlighted: Boolean

Determines whether the normal or highlighted attributes should be used.

Link copied to clipboard

Indicates whether this placemark's leader, if any, is pickable.

Link copied to clipboard
open override var isPickEnabled: Boolean
Link copied to clipboard
open override val isPointShape: Boolean

true when this shape's referencePosition coincides with where the user actually sees the shape (Placemark, Label, sightlines — the reference is the rendered location). false for shapes whose reference is computed from extended geometry and may sit far from where the user grabbed (Polygon centroid, Path centroid, Mesh).

Link copied to clipboard

The label text to draw near the placemark.

Link copied to clipboard

Sets the optional level-of-detail selector used to inject logic for selecting PlacemarkAttributes based on the camera distance and highlighted attribute. If set to null, the normal and highlight attribute bundles used respectfully for the normal and highlighted states.

Link copied to clipboard
open override var pickDelegate: Any?
Link copied to clipboard

The placemark's geographic position.

Link copied to clipboard
open override val referencePosition: Position

A position associated with the object that indicates its aggregate geographic position. For a Placemark, this is simply it's position property.

Link copied to clipboard
open override var zOrder: Double

Functions

Link copied to clipboard
fun Placemark.applyFeatureStyle(properties: LinkedHashMap<String, Any?>, density: Float = DEFAULT_DENSITY)

Apply icon URL + icon-offset + icon-scale (× density) to a Placemark, plus label-scale to its label-attributes. Invalid / non-HTTPS icon URLs are skipped.

Link copied to clipboard
open override fun <T> getUserProperty(key: Any): T?
Link copied to clipboard
open override fun hasUserProperty(key: Any): Boolean
Link copied to clipboard
open override fun moveTo(globe: Globe, position: Position)

Moves the shape over the globe's surface. For a Placemark, this simply set Placemark.position.

Link copied to clipboard
open override fun putUserProperty(key: Any, value: Any): Any?
Link copied to clipboard
open override fun removeUserProperty(key: Any): Any?
Link copied to clipboard
open override fun render(rc: RenderContext)