Class PlacemarkAttributes


  • public class PlacemarkAttributes
    extends java.lang.Object
    Holds attributes applied to Placemark shapes.
    • Constructor Detail

      • PlacemarkAttributes

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

        public PlacemarkAttributes​(PlacemarkAttributes attributes)
        Constructs a placemark attribute bundle from the specified attributes. Performs a deep copy of the color, offset, label attributes and leader-line attributes.
        Parameters:
        attributes - The attributes to be copied.
        Throws:
        java.lang.IllegalArgumentException - If the location is null
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getImageSource

        public ImageSource getImageSource()
        Returns the source of the placemark's image. If null, the placemark is drawn as a square whose width and height are the value of this attribute object's [imageScale]getImageScale() property.
      • getImageColor

        public Color getImageColor()
        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.
      • setImageColor

        public PlacemarkAttributes setImageColor​(Color imageColor)
        Sets 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.
        Parameters:
        imageColor - The new image color
      • getImageOffset

        public Offset getImageOffset()
        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.
      • setImageOffset

        public PlacemarkAttributes setImageOffset​(Offset imageOffset)
        Sets the location within the placemark's image to align with the placemark's geographic position.
        Parameters:
        imageOffset - The new location used to align the placemark's image.
      • getImageScale

        public double getImageScale()
        Returns the amount to scale the placemark's image. When this attribute bundle has a valid image path the scale is applied to the image's dimensions. Otherwise the scale indicates the dimensions in pixels of a square drawn at the placemark's geographic position. A scale of 0 causes the placemark to disappear; however, the placemark's label, if any, is still drawn.
      • setImageScale

        public PlacemarkAttributes setImageScale​(double imageScale)
        Sets the amount to scale the placemark's image. When this attribute bundle has a valid image path the scale is applied to the image's dimensions. Otherwise the scale indicates the dimensions in pixels of a square drawn at the placemark's geographic position. A scale of 0 causes the placemark to disappear; however, the placemark's label, if any, is still drawn.
        Parameters:
        imageScale - The new image scale value.
      • getMinimumImageScale

        public double getMinimumImageScale()
        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.
      • setMinimumImageScale

        public PlacemarkAttributes setMinimumImageScale​(double minimumImageScale)
        Sets the minimum amount to scale the placemark's image when Placemark.isEyeDistanceScaling() is true. This value controls the minimum size of the rendered placemark. A value of 0 allows the placemark to disappear.
        Parameters:
        minimumImageScale - The new image scale value.
      • isDrawLeader

        public boolean isDrawLeader()
        Returns whether to draw a line from the placemark's geographic position to the ground.
      • setDrawLeader

        public PlacemarkAttributes setDrawLeader​(boolean drawLeader)
        Sets whether to draw a line from the placemark's geographic position to the ground.
        Parameters:
        drawLeader - The new draw leader-line setting.
      • isDepthTest

        public boolean isDepthTest()
        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.
      • setDepthTest

        public PlacemarkAttributes setDepthTest​(boolean depthTest)
        Sets 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.
        Parameters:
        depthTest - The new depth test setting.
      • getLabelAttributes

        public TextAttributes getLabelAttributes()
        Returns the attributes to apply to the placemark's label, if any. If null, the placemark's label is not drawn.
      • setLabelAttributes

        public PlacemarkAttributes setLabelAttributes​(TextAttributes labelAttributes)
        Sets the attributes to apply to the placemark's label, if any. If null, the placemark's label is not drawn.
        Parameters:
        labelAttributes - The new label attributes for the placemark. May be null.
      • getLeaderAttributes

        public ShapeAttributes getLeaderAttributes()
        Returns the attributes to apply to the leader line if it's drawn. If null, the placemark's leader line is not drawn.
      • setLeaderAttributes

        public PlacemarkAttributes setLeaderAttributes​(ShapeAttributes leaderAttributes)
        Sets the attributes to apply to the leader line if it's drawn. If null, the placemark's leader line is not drawn.
        Parameters:
        leaderAttributes - The new leader-line attributes. May be null.