src/shapes/Placemark.js
function (position, eyeDistanceScaling, attributes) {
            if (!position) {
                throw new ArgumentError(
                    Logger.logMessage(Logger.LEVEL_SEVERE, "Placemark", "constructor", "missingPosition"));
            }

            Renderable.call(this);

            /**
             * The placemark's attributes. If null and this placemark is not highlighted, this placemark is not
             * drawn.
             * @type {PlacemarkAttributes}
             * @default see [PlacemarkAttributes]{@link PlacemarkAttributes}
             */
            this.attributes = attributes ? attributes : new PlacemarkAttributes(null);

            /**
             * The attributes used when this placemark's highlighted flag is true. If null and the
             * highlighted flag is true, this placemark's normal attributes are used. If they, too, are null, this
             * placemark is not drawn.
             * @type {PlacemarkAttributes}
             * @default null
             */
            this.highlightAttributes = null;

            /**
             * Indicates whether this placemark uses its highlight attributes rather than its normal attributes.
             * @type {Boolean}
             * @default false
             */
            this.highlighted = false;

            /**
             * This placemark's geographic position.
             * @type {Position}
             */
            this.position = position;

            /**
             * Indicates whether this 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 [eyeDistanceScalingThreshold]{@link Placemark#eyeDistanceScalingThreshold} property.
             * When the eye distance is below the threshold, this placemark is scaled only according to the
             * [imageScale]{@link PlacemarkAttributes#imageScale}.
             * @type {Boolean}
             */
            this.eyeDistanceScaling = eyeDistanceScaling;

            /**
             * The eye distance above which to reduce the size of this placemark, in meters. If
             * [eyeDistanceScaling]{@link Placemark#eyeDistanceScaling} is true, this placemark's image, label and leader
             * line sizes are reduced as the eye distance increases beyond this threshold.
             * @type {Number}
             * @default 1e6 (meters)
             */
            this.eyeDistanceScalingThreshold = 1e6;

            /**
             * The eye altitude above which this placemark's label is not displayed.
             * @type {number}
             */
            this.eyeDistanceScalingLabelThreshold = 1.5 * this.eyeDistanceScalingThreshold;

            /**
             * This placemark's textual label. If null, no label is drawn.
             * @type {String}
             * @default null
             */
            this.label = null;

            /**
             * This placemark's altitude mode. May be one of
             * <ul>
             *  <li>[WorldWind.ABSOLUTE]{@link WorldWind#ABSOLUTE}</li>
             *  <li>[WorldWind.RELATIVE_TO_GROUND]{@link WorldWind#RELATIVE_TO_GROUND}</li>
             *  <li>[WorldWind.CLAMP_TO_GROUND]{@link WorldWind#CLAMP_TO_GROUND}</li>
             * </ul>
             * @default WorldWind.ABSOLUTE
             */
            this.altitudeMode = WorldWind.ABSOLUTE;

            /**
             * Indicates whether this placemark has visual priority over other shapes in the scene.
             * @type {Boolean}
             * @default false
             */
            this.alwaysOnTop = false;

            /**
             * Indicates whether this placemark's leader line, if any, is pickable.
             * @type {Boolean}
             * @default false
             */
            this.enableLeaderLinePicking = false;

            /**
             * Indicates whether this placemark's image should be re-retrieved even if it has already been retrieved.
             * Set this property to true when the image has changed but has the same image path.
             * The property is set to false when the image is re-retrieved.
             * @type {Boolean}
             */
            this.updateImage = true;

            /**
             * Indicates the group ID of the declutter group to include this placemark. If non-zero, this placemark
             * is decluttered relative to all other shapes within its group.
             * @type {Number}
             * @default 2
             */
            this.declutterGroup = 2;

            /**
             * This placemark's target label visibility, a value between 0 and 1. During ordered rendering this
             * placemark modifies its [current visibility]{@link Placemark#currentVisibility} towards its target
             * visibility at the rate specified by the draw context's [fade time]{@link DrawContext#fadeTime} property.
             * The target visibility and current visibility are used to control the fading in and out of this
             * placemark's label.
             * @type {Number}
             * @default 1
             */
            this.targetVisibility = 1;

            /**
             * This placemark's current label visibility, a value between 0 and 1. This property scales the placemark's
             * effective label opacity. It is incremented or decremented each frame according to the draw context's
             * [fade time]{@link DrawContext#fadeTime} property in order to achieve this placemark's
             * [target visibility]{@link Placemark#targetVisibility}. This current visibility and target visibility are
             * used to control the fading in and out of this placemark's label.
             * @type {Number}
             * @default 1
             * @readonly
             */
            this.currentVisibility = 1;

            /**
             * The amount of rotation to apply to the image, measured in degrees clockwise and relative to this
             * placemark's [imageRotationReference]{@link Placemark#imageRotationReference}.
             * @type {Number}
             * @default 0
             */
            this.imageRotation = 0;

            /**
             * The amount of tilt to apply to the image, measured in degrees away from the eye point and relative
             * to this placemark's [imageTiltReference]{@link 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.
             * @type {Number}
             * @default 0
             */
            this.imageTilt = 0;

            /**
             * Indicates whether to apply this placemark's image rotation relative to the screen or the globe.
             * If WorldWind.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 WorldWind.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.
             * @type {String}
             * @default WorldWind.RELATIVE_TO_SCREEN
             */
            this.imageRotationReference = WorldWind.RELATIVE_TO_SCREEN;

            /**
             * Indicates whether to apply this placemark's image tilt relative to the screen or the globe.
             * If WorldWind.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 WorldWind.RELATIVE_TO_GLOBE, this placemark's image is tilted towards the globe's surface,
             * and retains its orientation relative to the surface.
             * @type {string}
             * @default WorldWind.RELATIVE_TO_SCREEN
             */
            this.imageTiltReference = WorldWind.RELATIVE_TO_SCREEN;

            // Internal use only. Intentionally not documented.
            this.activeAttributes = null;

            // Internal use only. Intentionally not documented.
            this.activeTexture = null;

            // Internal use only. Intentionally not documented.
            this.labelTexture = null;

            // Internal use only. Intentionally not documented.
            this.placePoint = new Vec3(0, 0, 0); // Cartesian point corresponding to this placemark's geographic position

            // Internal use only. Intentionally not documented.
            this.groundPoint = new Vec3(0, 0, 0); // Cartesian point corresponding to ground position below this placemark

            // Internal use only. Intentionally not documented.
            this.imageTransform = Matrix.fromIdentity();

            // Internal use only. Intentionally not documented.
            this.labelTransform = Matrix.fromIdentity();

            // Internal use only. Intentionally not documented.
            this.texCoordMatrix = Matrix.fromIdentity();

            // Internal use only. Intentionally not documented.
            this.imageBounds = null;

            // Internal use only. Intentionally not documented.
            this.layer = null;

            // Internal use only. Intentionally not documented.
            this.depthOffset = -0.003;
        }
function (position, eyeDistanceScaling, attributes) {
            if (!position) {
                throw new ArgumentError(
                    Logger.logMessage(Logger.LEVEL_SEVERE, "Placemark", "constructor", "missingPosition"));
            }

            Renderable.call(this);

            /**
             * The placemark's attributes. If null and this placemark is not highlighted, this placemark is not
             * drawn.
             * @type {PlacemarkAttributes}
             * @default see [PlacemarkAttributes]{@link PlacemarkAttributes}
             */
            this.attributes = attributes ? attributes : new PlacemarkAttributes(null);

            /**
             * The attributes used when this placemark's highlighted flag is true. If null and the
             * highlighted flag is true, this placemark's normal attributes are used. If they, too, are null, this
             * placemark is not drawn.
             * @type {PlacemarkAttributes}
             * @default null
             */
            this.highlightAttributes = null;

            /**
             * Indicates whether this placemark uses its highlight attributes rather than its normal attributes.
             * @type {Boolean}
             * @default false
             */
            this.highlighted = false;

            /**
             * This placemark's geographic position.
             * @type {Position}
             */
            this.position = position;

            /**
             * Indicates whether this 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 [eyeDistanceScalingThreshold]{@link Placemark#eyeDistanceScalingThreshold} property.
             * When the eye distance is below the threshold, this placemark is scaled only according to the
             * [imageScale]{@link PlacemarkAttributes#imageScale}.
             * @type {Boolean}
             */
            this.eyeDistanceScaling = eyeDistanceScaling;

            /**
             * The eye distance above which to reduce the size of this placemark, in meters. If
             * [eyeDistanceScaling]{@link Placemark#eyeDistanceScaling} is true, this placemark's image, label and leader
             * line sizes are reduced as the eye distance increases beyond this threshold.
             * @type {Number}
             * @default 1e6 (meters)
             */
            this.eyeDistanceScalingThreshold = 1e6;

            /**
             * The eye altitude above which this placemark's label is not displayed.
             * @type {number}
             */
            this.eyeDistanceScalingLabelThreshold = 1.5 * this.eyeDistanceScalingThreshold;

            /**
             * This placemark's textual label. If null, no label is drawn.
             * @type {String}
             * @default null
             */
            this.label = null;

            /**
             * This placemark's altitude mode. May be one of
             * <ul>
             *  <li>[WorldWind.ABSOLUTE]{@link WorldWind#ABSOLUTE}</li>
             *  <li>[WorldWind.RELATIVE_TO_GROUND]{@link WorldWind#RELATIVE_TO_GROUND}</li>
             *  <li>[WorldWind.CLAMP_TO_GROUND]{@link WorldWind#CLAMP_TO_GROUND}</li>
             * </ul>
             * @default WorldWind.ABSOLUTE
             */
            this.altitudeMode = WorldWind.ABSOLUTE;

            /**
             * Indicates whether this placemark has visual priority over other shapes in the scene.
             * @type {Boolean}
             * @default false
             */
            this.alwaysOnTop = false;

            /**
             * Indicates whether this placemark's leader line, if any, is pickable.
             * @type {Boolean}
             * @default false
             */
            this.enableLeaderLinePicking = false;

            /**
             * Indicates whether this placemark's image should be re-retrieved even if it has already been retrieved.
             * Set this property to true when the image has changed but has the same image path.
             * The property is set to false when the image is re-retrieved.
             * @type {Boolean}
             */
            this.updateImage = true;

            /**
             * Indicates the group ID of the declutter group to include this placemark. If non-zero, this placemark
             * is decluttered relative to all other shapes within its group.
             * @type {Number}
             * @default 2
             */
            this.declutterGroup = 2;

            /**
             * This placemark's target label visibility, a value between 0 and 1. During ordered rendering this
             * placemark modifies its [current visibility]{@link Placemark#currentVisibility} towards its target
             * visibility at the rate specified by the draw context's [fade time]{@link DrawContext#fadeTime} property.
             * The target visibility and current visibility are used to control the fading in and out of this
             * placemark's label.
             * @type {Number}
             * @default 1
             */
            this.targetVisibility = 1;

            /**
             * This placemark's current label visibility, a value between 0 and 1. This property scales the placemark's
             * effective label opacity. It is incremented or decremented each frame according to the draw context's
             * [fade time]{@link DrawContext#fadeTime} property in order to achieve this placemark's
             * [target visibility]{@link Placemark#targetVisibility}. This current visibility and target visibility are
             * used to control the fading in and out of this placemark's label.
             * @type {Number}
             * @default 1
             * @readonly
             */
            this.currentVisibility = 1;

            /**
             * The amount of rotation to apply to the image, measured in degrees clockwise and relative to this
             * placemark's [imageRotationReference]{@link Placemark#imageRotationReference}.
             * @type {Number}
             * @default 0
             */
            this.imageRotation = 0;

            /**
             * The amount of tilt to apply to the image, measured in degrees away from the eye point and relative
             * to this placemark's [imageTiltReference]{@link 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.
             * @type {Number}
             * @default 0
             */
            this.imageTilt = 0;

            /**
             * Indicates whether to apply this placemark's image rotation relative to the screen or the globe.
             * If WorldWind.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 WorldWind.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.
             * @type {String}
             * @default WorldWind.RELATIVE_TO_SCREEN
             */
            this.imageRotationReference = WorldWind.RELATIVE_TO_SCREEN;

            /**
             * Indicates whether to apply this placemark's image tilt relative to the screen or the globe.
             * If WorldWind.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 WorldWind.RELATIVE_TO_GLOBE, this placemark's image is tilted towards the globe's surface,
             * and retains its orientation relative to the surface.
             * @type {string}
             * @default WorldWind.RELATIVE_TO_SCREEN
             */
            this.imageTiltReference = WorldWind.RELATIVE_TO_SCREEN;

            // Internal use only. Intentionally not documented.
            this.activeAttributes = null;

            // Internal use only. Intentionally not documented.
            this.activeTexture = null;

            // Internal use only. Intentionally not documented.
            this.labelTexture = null;

            // Internal use only. Intentionally not documented.
            this.placePoint = new Vec3(0, 0, 0); // Cartesian point corresponding to this placemark's geographic position

            // Internal use only. Intentionally not documented.
            this.groundPoint = new Vec3(0, 0, 0); // Cartesian point corresponding to ground position below this placemark

            // Internal use only. Intentionally not documented.
            this.imageTransform = Matrix.fromIdentity();

            // Internal use only. Intentionally not documented.
            this.labelTransform = Matrix.fromIdentity();

            // Internal use only. Intentionally not documented.
            this.texCoordMatrix = Matrix.fromIdentity();

            // Internal use only. Intentionally not documented.
            this.imageBounds = null;

            // Internal use only. Intentionally not documented.
            this.layer = null;

            // Internal use only. Intentionally not documented.
            this.depthOffset = -0.003;
        }
function ( position , eyeDistanceScaling , attributes ) { if ( ! position ) { throw new ArgumentError ( Logger . logMessage ( Logger . LEVEL_SEVERE , "Placemark" , "constructor" , "missingPosition" ) ) ; } Renderable . call ( this ) ; /**
             * The placemark's attributes. If null and this placemark is not highlighted, this placemark is not
             * drawn.
             * @type {PlacemarkAttributes}
             * @default see [PlacemarkAttributes]{@link PlacemarkAttributes}
             */ this . attributes = attributes ? attributes : new PlacemarkAttributes ( null ) ; /**
             * The attributes used when this placemark's highlighted flag is true. If null and the
             * highlighted flag is true, this placemark's normal attributes are used. If they, too, are null, this
             * placemark is not drawn.
             * @type {PlacemarkAttributes}
             * @default null
             */ this . highlightAttributes = null ; /**
             * Indicates whether this placemark uses its highlight attributes rather than its normal attributes.
             * @type {Boolean}
             * @default false
             */ this . highlighted = false ; /**
             * This placemark's geographic position.
             * @type {Position}
             */ this . position = position ; /**
             * Indicates whether this 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 [eyeDistanceScalingThreshold]{@link Placemark#eyeDistanceScalingThreshold} property.
             * When the eye distance is below the threshold, this placemark is scaled only according to the
             * [imageScale]{@link PlacemarkAttributes#imageScale}.
             * @type {Boolean}
             */ this . eyeDistanceScaling = eyeDistanceScaling ; /**
             * The eye distance above which to reduce the size of this placemark, in meters. If
             * [eyeDistanceScaling]{@link Placemark#eyeDistanceScaling} is true, this placemark's image, label and leader
             * line sizes are reduced as the eye distance increases beyond this threshold.
             * @type {Number}
             * @default 1e6 (meters)
             */ this . eyeDistanceScalingThreshold = 1e6 ; /**
             * The eye altitude above which this placemark's label is not displayed.
             * @type {number}
             */ this . eyeDistanceScalingLabelThreshold = 1.5 * this . eyeDistanceScalingThreshold ; /**
             * This placemark's textual label. If null, no label is drawn.
             * @type {String}
             * @default null
             */ this . label = null ; /**
             * This placemark's altitude mode. May be one of
             * <ul>
             *  <li>[WorldWind.ABSOLUTE]{@link WorldWind#ABSOLUTE}</li>
             *  <li>[WorldWind.RELATIVE_TO_GROUND]{@link WorldWind#RELATIVE_TO_GROUND}</li>
             *  <li>[WorldWind.CLAMP_TO_GROUND]{@link WorldWind#CLAMP_TO_GROUND}</li>
             * </ul>
             * @default WorldWind.ABSOLUTE
             */ this . altitudeMode = WorldWind . ABSOLUTE ; /**
             * Indicates whether this placemark has visual priority over other shapes in the scene.
             * @type {Boolean}
             * @default false
             */ this . alwaysOnTop = false ; /**
             * Indicates whether this placemark's leader line, if any, is pickable.
             * @type {Boolean}
             * @default false
             */ this . enableLeaderLinePicking = false ; /**
             * Indicates whether this placemark's image should be re-retrieved even if it has already been retrieved.
             * Set this property to true when the image has changed but has the same image path.
             * The property is set to false when the image is re-retrieved.
             * @type {Boolean}
             */ this . updateImage = true ; /**
             * Indicates the group ID of the declutter group to include this placemark. If non-zero, this placemark
             * is decluttered relative to all other shapes within its group.
             * @type {Number}
             * @default 2
             */ this . declutterGroup = 2 ; /**
             * This placemark's target label visibility, a value between 0 and 1. During ordered rendering this
             * placemark modifies its [current visibility]{@link Placemark#currentVisibility} towards its target
             * visibility at the rate specified by the draw context's [fade time]{@link DrawContext#fadeTime} property.
             * The target visibility and current visibility are used to control the fading in and out of this
             * placemark's label.
             * @type {Number}
             * @default 1
             */ this . targetVisibility = 1 ; /**
             * This placemark's current label visibility, a value between 0 and 1. This property scales the placemark's
             * effective label opacity. It is incremented or decremented each frame according to the draw context's
             * [fade time]{@link DrawContext#fadeTime} property in order to achieve this placemark's
             * [target visibility]{@link Placemark#targetVisibility}. This current visibility and target visibility are
             * used to control the fading in and out of this placemark's label.
             * @type {Number}
             * @default 1
             * @readonly
             */ this . currentVisibility = 1 ; /**
             * The amount of rotation to apply to the image, measured in degrees clockwise and relative to this
             * placemark's [imageRotationReference]{@link Placemark#imageRotationReference}.
             * @type {Number}
             * @default 0
             */ this . imageRotation = 0 ; /**
             * The amount of tilt to apply to the image, measured in degrees away from the eye point and relative
             * to this placemark's [imageTiltReference]{@link 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.
             * @type {Number}
             * @default 0
             */ this . imageTilt = 0 ; /**
             * Indicates whether to apply this placemark's image rotation relative to the screen or the globe.
             * If WorldWind.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 WorldWind.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.
             * @type {String}
             * @default WorldWind.RELATIVE_TO_SCREEN
             */ this . imageRotationReference = WorldWind . RELATIVE_TO_SCREEN ; /**
             * Indicates whether to apply this placemark's image tilt relative to the screen or the globe.
             * If WorldWind.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 WorldWind.RELATIVE_TO_GLOBE, this placemark's image is tilted towards the globe's surface,
             * and retains its orientation relative to the surface.
             * @type {string}
             * @default WorldWind.RELATIVE_TO_SCREEN
             */ this . imageTiltReference = WorldWind . RELATIVE_TO_SCREEN ; // Internal use only. Intentionally not documented. this . activeAttributes = null ; // Internal use only. Intentionally not documented. this . activeTexture = null ; // Internal use only. Intentionally not documented. this . labelTexture = null ; // Internal use only. Intentionally not documented. this . placePoint = new Vec3 ( 0 , 0 , 0 ) ; // Cartesian point corresponding to this placemark's geographic position // Internal use only. Intentionally not documented. this . groundPoint = new Vec3 ( 0 , 0 , 0 ) ; // Cartesian point corresponding to ground position below this placemark // Internal use only. Intentionally not documented. this . imageTransform = Matrix . fromIdentity ( ) ; // Internal use only. Intentionally not documented. this . labelTransform = Matrix . fromIdentity ( ) ; // Internal use only. Intentionally not documented. this . texCoordMatrix = Matrix . fromIdentity ( ) ; // Internal use only. Intentionally not documented. this . imageBounds = null ; // Internal use only. Intentionally not documented. this . layer = null ; // Internal use only. Intentionally not documented. this . depthOffset = - 0.003 ; }
Constructs a placemark.
@alias Placemark
@constructor
@augments Renderable
@classdesc Represents a Placemark shape. A placemark displays an image, a label and a leader line connecting
the placemark's geographic position to the ground. All three of these items are optional. By default, the
leader line is not pickable. See [enableLeaderLinePicking]{@link Placemark#enableLeaderLinePicking}.
<p>
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.
<p>
By default, placemarks participate in decluttering with a [declutterGroupID]{@link Placemark#declutterGroup}
of 2. Only placemark labels are decluttered relative to other placemark labels. The placemarks themselves
are optionally scaled with eye distance to achieve decluttering of the placemark as a whole.
See [eyeDistanceScaling]{@link Placemark#eyeDistanceScaling}.
@param {Position} position The placemark's geographic position.
@param {Boolean} eyeDistanceScaling Indicates whether the size of this placemark scales with eye distance.
See [eyeDistanceScalingThreshold]{@link Placemark#eyeDistanceScalingThreshold} and
[eyeDistanceScalingLabelThreshold]{@link Placemark#eyeDistanceScalingLabelThreshold}.
@param {PlacemarkAttributes} attributes The attributes to associate with this placemark. May be null,
in which case default attributes are associated.
@throws {ArgumentError} If the specified position is null or undefined.
Constructs a placemark .