Class KmlScreenOverlay

java.lang.Object
com.esri.arcgisruntime.ogc.kml.KmlNode
com.esri.arcgisruntime.ogc.kml.KmlScreenOverlay

public final class KmlScreenOverlay extends KmlNode
A KML screen overlay is an image overlay fixed to the screen. Screen overlays may be used for compasses, logos and heads-up displays.
Since:
100.4.0
  • Property Details

    • color

      public ObjectProperty<Color> colorProperty
      The color mask to be applied to the KML screen overlay's image buffer.

      A color mask that can be used to blend the image associated with the KML screen overlay. Pixels in the overlay image are multiplied by this color channel-by-channel.

      Attempting to set the color to null will throw a NullPointerException exception.

      Since:
      200.0.0
      See Also:
  • Constructor Details

    • KmlScreenOverlay

      public KmlScreenOverlay(KmlIcon kmlIcon)
      Creates a KML screen overlay with the specified icon.

      If the icon is null, a rectangle is drawn using the color and size defined by getColor() and getSize().

      Parameters:
      kmlIcon - the icon associated with the screen overlay
      Since:
      100.7.0
  • Method Details

    • colorProperty

      public ObjectProperty<Color> colorProperty()
      The color mask to be applied to the KML screen overlay's image buffer.

      A color mask that can be used to blend the image associated with the KML screen overlay. Pixels in the overlay image are multiplied by this color channel-by-channel.

      Attempting to set the color to null will throw a NullPointerException exception.

      Returns:
      the color property
      Since:
      200.0.0
      See Also:
    • getColor

      public Color getColor()
      Gets the value of the color property.
      Property description:
      The color mask to be applied to the KML screen overlay's image buffer.

      A color mask that can be used to blend the image associated with the KML screen overlay. Pixels in the overlay image are multiplied by this color channel-by-channel.

      Attempting to set the color to null will throw a NullPointerException exception.

      Returns:
      the value of the color property
      Since:
      200.0.0
      See Also:
    • setColor

      public void setColor(Color color)
      Sets the value of the color property.
      Property description:
      The color mask to be applied to the KML screen overlay's image buffer.

      A color mask that can be used to blend the image associated with the KML screen overlay. Pixels in the overlay image are multiplied by this color channel-by-channel.

      Attempting to set the color to null will throw a NullPointerException exception.

      Parameters:
      color - the value for the color property
      Since:
      200.0.0
      See Also:
    • setColor

      @Deprecated(since="200.0.0", forRemoval=true) public void setColor(int color)
      Deprecated, for removal: This API element is subject to removal in a future version.
      as of 200.0.0, replaced by setColor(Color)
      Sets the color mask to be applied to the KML screen overlay's image buffer.

      This is a color mask that can be used to blend the image associate with the KML screen overlay. Pixels in the overlay image are multiplied by this color channel-by-channel.

      At version 100.7, only the alpha (opacity) channel is multiplied; all others are left as-is.

      The default value is 0xFFFFFFFF (white).

      Parameters:
      color - the color mask in an integer 0xAARRGGBB format
      Since:
      100.7.0
      See Also:
    • getDrawOrder

      public int getDrawOrder()
      Gets the KML screen overlay's draw order.
      Returns:
      the draw order
      Since:
      100.4.0
      See Also:
    • setDrawOrder

      public void setDrawOrder(int drawOrder)
      Sets the KML screen overlay's draw order.

      Overlays with higher draw order values are drawn on top of those with lower values.

      Parameters:
      drawOrder - the draw order
      Since:
      100.7.0
    • getIcon

      public KmlIcon getIcon()
      Gets the KML screen overlay icon.

      If the icon is null, a rectangle is drawn using the color and size defined by getColor() and getSize().

      Returns:
      a KmlIcon
      Since:
      100.6.0
      See Also:
    • setIcon

      public void setIcon(KmlIcon kmlIcon)
      Sets the KML screen overlay icon.

      If the icon is null, a rectangle is drawn using the color and size defined by getColor() and getSize().

      Parameters:
      kmlIcon - a KmlIcon
      Since:
      100.6.0
      See Also:
    • getOverlayCoordinate

      public KmlImageCoordinate getOverlayCoordinate()
      Gets a point on (or outside of) the overlay image that is mapped to the screen coordinate.
      Returns:
      a KmlImageCoordinate
      Since:
      100.7.0
      See Also:
    • setOverlayCoordinate

      public void setOverlayCoordinate(KmlImageCoordinate kmlImageCoordinate)
      Sets a point on (or outside of) the overlay image that is mapped to the screen coordinate returned by getScreenCoordinate(). It requires x and y values, and the units for those values.

      The overlay image coordinate's x and y values are specified by KmlImageCoordinate. It can be set in three different ways: as pixels ("pixels"), as fractions of the image ("fraction"), or as inset pixels ("insetPixels"), which is an offset in pixels from the upper right corner of the image. The x and y positions can be specified in different ways, for example, x can be in pixels and y can be a fraction.

      The origin of the coordinate system is in the lower left corner of the image. If not specified, the default overlay coordinate is the center of the overlay image.

      Parameters:
      kmlImageCoordinate - a KmlImageCoordinate
      Since:
      100.7.0
      See Also:
    • getRotation

      public double getRotation()
      Gets the angle of rotation of the screen overlay.

      Returns:
      the angle rotation in decimal degrees
      Since:
      100.7.0
      See Also:
    • setRotation

      public void setRotation(double rotation)
      Sets the angle of rotation of the screen overlay.

      The value is an angle in decimal degrees starting from north. A value of zero means no rotation, a positive number indicates clockwise rotation and a negative number indicates counterclockwise. The center of the rotation, if not specified in the rotation coordinate returned by getRotationCoordinate, is the center of the overlay image.

      Parameters:
      rotation - the angle rotation in decimal degrees
      Since:
      100.7.0
      See Also:
    • getScreenCoordinate

      public KmlImageCoordinate getScreenCoordinate()
      Gets a point relative to the screen origin that the overlay image is mapped to.
      Returns:
      a KmlImageCoordinate
      Since:
      100.7.0
      See Also:
    • setScreenCoordinate

      public void setScreenCoordinate(KmlImageCoordinate kmlImageCoordinate)
      Sets a point relative to the screen origin that the overlay image is mapped to.

      The x and y values can be set in three different ways: as pixels ("pixels"), as fractions of the screen ("fraction"), or as inset pixels ("insetPixels"), which is an offset in pixels from the upper right corner of the screen. The x and y positions can be specified in different ways—for example, x can be in pixels and y can be a fraction.

      The origin of the coordinate system is in the lower left corner of the screen. If not specified, the default screen coordinate is the center of the screen.

      Parameters:
      kmlImageCoordinate - a KmlImageCoordinate
      Since:
      100.7.0
      See Also:
    • getRotationCoordinate

      public KmlImageCoordinate getRotationCoordinate()
      Gets the point relative to the screen about which the screen overlay is rotated.

      Returns:
      a KmlImageCoordinate
      Since:
      100.7.0
      See Also:
    • setRotationCoordinate

      public void setRotationCoordinate(KmlImageCoordinate kmlImageCoordinate)
      Sets the point relative to the screen about which the screen overlay is rotated.

      By default, the rotation point is the center of the overlay.

      Parameters:
      kmlImageCoordinate - a KmlImageCoordinate
      Since:
      100.7.0
      See Also:
    • getSize

      public KmlImageCoordinate getSize()
      Gets the size of the image for the screen overlay.
      Returns:
      a KmlImageCoordinate
      Since:
      100.7.0
      See Also:
    • setSize

      public void setSize(KmlImageCoordinate kmlImageCoordinate)
      Sets the size of the image for the screen overlay.

      The size is specified by KmlImageCoordinate's x and y values. A value of −1 indicates to use the native dimension. A value of 0 indicates to maintain the aspect ratio. A value of n sets the value of the dimension. By default, the size is the original size of the image.

      For example:

      • An x value of +/-1 and y value of +/-1 in KmlUnitsType.FRACTION indicates the image size equals its original x and y dimensions.
      • An x value of +/-1 and y value of 0.2 in KmlUnitsType.FRACTION indicates the image size equals its original x dimension and 20% of its y dimension.
      • An x value of 100 and y value of 500 in KmlUnitsType.PIXELS indicates the image is of size 100 pixels by 500 pixels.
      Parameters:
      kmlImageCoordinate - a KmlImageCoordinate
      Since:
      100.7.0
      See Also: