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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.esri.arcgisruntime.ogc.kml.KmlNode
KmlNode.RefreshStatus
-
-
Constructor Summary
Constructors Constructor Description KmlScreenOverlay(KmlIcon kmlIcon)
Creates a KML screen overlay with the specified icon.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColor()
Gets the color mask to be applied to the KML screen overlay's image buffer.int
getDrawOrder()
Gets the KML screen overlay's draw order.KmlIcon
getIcon()
Gets the KML screen overlay icon.KmlImageCoordinate
getOverlayCoordinate()
Gets a point on (or outside of) the overlay image that is mapped to the screen coordinate.double
getRotation()
Gets the angle of rotation of the screen overlay.KmlImageCoordinate
getRotationCoordinate()
Gets the point relative to the screen about which the screen overlay is rotated.KmlImageCoordinate
getScreenCoordinate()
Gets a point relative to the screen origin that the overlay image is mapped to.KmlImageCoordinate
getSize()
Gets the size of the image for the screen overlay.void
setColor(int color)
Sets the color mask to be applied to the KML screen overlay's image buffer.void
setDrawOrder(int drawOrder)
Sets the KML screen overlay's draw order.void
setIcon(KmlIcon kmlIcon)
Sets the KML screen overlay icon.void
setOverlayCoordinate(KmlImageCoordinate kmlImageCoordinate)
Sets a point on (or outside of) the overlay image that is mapped to the screen coordinate returned bygetScreenCoordinate()
.void
setRotation(double rotation)
Sets the angle of rotation of the screen overlay.void
setRotationCoordinate(KmlImageCoordinate kmlImageCoordinate)
Sets the point relative to the screen about which the screen overlay is rotated.void
setScreenCoordinate(KmlImageCoordinate kmlImageCoordinate)
Sets a point relative to the screen origin that the overlay image is mapped to.void
setSize(KmlImageCoordinate kmlImageCoordinate)
Sets the size of the image for the screen overlay.-
Methods inherited from class com.esri.arcgisruntime.ogc.kml.KmlNode
addIconUpdatedEventListener, addRefreshStatusChangedListener, getAddress, getBalloonBackgroundColor, getBalloonContent, getDescription, getExtent, getHighlightStyle, getId, getName, getParentNode, getRefreshError, getRefreshStatus, getSnippet, getSnippetMaxLines, getStyle, getTimeExtent, getUxIcon, getUxIconColor, getUxIconId, getViewpoint, isHighlighted, isVisible, removeIconUpdatedEventListener, removeRefreshStatusChangedListener, saveAsAsync, setAddress, setDescription, setHighlighted, setHighlightStyle, setId, setName, setSnippet, setSnippetMaxLines, setStyle, setTimeExtent, setViewpoint, setVisible
-
-
-
-
Constructor Detail
-
KmlScreenOverlay
public KmlScreenOverlay(KmlIcon kmlIcon)
Creates a KML screen overlay with the specified icon.- Parameters:
kmlIcon
- the icon associated with the screen overlay- Since:
- 100.7.0
-
-
Method Detail
-
getColor
public int getColor()
Gets the color mask to be applied to the KML screen overlay's image buffer.- Returns:
- the color mask in an integer 0xAARRGGBB format
- Since:
- 100.4.0
- See Also:
setColor(int)
-
setColor
public void setColor(int 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:
getColor()
-
getDrawOrder
public int getDrawOrder()
Gets the KML screen overlay's draw order.- Returns:
- the draw order
- Since:
- 100.4.0
- See Also:
setDrawOrder(int)
-
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.- Returns:
- a KmlIcon
- Since:
- 100.6.0
- See Also:
setIcon(KmlIcon)
-
setIcon
public void setIcon(KmlIcon kmlIcon)
Sets the KML screen overlay icon.- Parameters:
kmlIcon
- a KmlIcon- Since:
- 100.6.0
- See Also:
getIcon()
-
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(KmlImageCoordinate)
-
setOverlayCoordinate
public void setOverlayCoordinate(KmlImageCoordinate kmlImageCoordinate)
Sets a point on (or outside of) the overlay image that is mapped to the screen coordinate returned bygetScreenCoordinate()
. 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:
getOverlayCoordinate()
,setScreenCoordinate(KmlImageCoordinate)
-
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(double)
-
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:
getRotation()
,getRotationCoordinate()
-
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(KmlImageCoordinate)
-
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:
getScreenCoordinate()
,setOverlayCoordinate(KmlImageCoordinate)
-
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(KmlImageCoordinate)
-
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:
getRotationCoordinate()
-
getSize
public KmlImageCoordinate getSize()
Gets the size of the image for the screen overlay.- Returns:
- a KmlImageCoordinate
- Since:
- 100.7.0
- See Also:
setSize(KmlImageCoordinate)
-
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:
getSize()
-
An x value of +/-1 and y value of +/-1 in
-
-