The child of specifies the image to be used as the overlay. This file
can be either on a local file system or on a web server. If this element is omitted
or contains no , a rectangle is drawn using the color and size defined by
the screen overlay.
This element draws an image overlay fixed to the screen. Sample uses for ScreenOverlays
are compasses, logos, and heads-up displays. ScreenOverlay sizing is determined
by the element. Positioning of the overlay is handled by mapping a point
in the image specified by to a point on the screen specified by .
Then the image is rotated by degrees about a point relative to the screen
specified by .
This element draws an image overlay fixed to the screen. Sample uses for ScreenOverlays
are compasses, logos, and heads-up displays. ScreenOverlay sizing is determined
by the element. Positioning of the overlay is handled by mapping a point
in the image specified by to a point on the screen specified by .
Then the image is rotated by degrees about a point relative to the screen
specified by .
Syntax:
<ScreenOverlay id="ID">
<!-- inherited from Feature element -->
<name>...</name> <!-- string -->
<visibility>1</visibility> <!-- boolean -->
<open>0</open> <!-- boolean -->
<atom:author>...<atom:author> <!-- xmlns:atom -->
<atom:link>...</atom:link> <!-- xmlns:atom -->
<address>...</address> <!-- string -->
<xal:AddressDetails>...</xal:AddressDetails> <!-- xmlns:xal --> <phoneNumber>...</phoneNumber> <!-- string --> <Snippet maxLines="2">...</Snippet> <!-- string -->
<description>...</description> <!-- string -->
<AbstractView>...</AbstractView> <!-- Camera or LookAt -->
<TimePrimitive>...</TimePrimitive>
<styleUrl>...</styleUrl> <!-- anyURI -->
<StyleSelector>...</StyleSelector>
<Region>...</Region>
<Metadata>...</Metadata> <!-- deprecated in KML 2.2 -->
<ExtendedData>...</ExtendedData> <!-- new in KML 2.2 -->
<!-- inherited from Overlay element -->
<color>ffffffff</color> <!-- kml:color -->
<drawOrder>0</drawOrder> <!-- int -->
<Icon>...</Icon>
<!-- specific to ScreenOverlay -->
<overlayXY x="double" y="double" xunits="fraction" yunits="fraction"/>
<!-- vec2 -->
<!-- xunits and yunits can be one of: fraction, pixels, or insetPixels -->
<screenXY x="double" y="double" xunits="fraction" yunits="fraction"/>
<!-- vec2 -->
<rotationXY x="double" y="double" xunits="fraction" yunits"fraction"/>
<!-- vec2 -->
<size x="double" y="double" xunits="fraction" yunits="fraction"/>
<!-- vec2 -->
<rotation>0</rotation> <!-- float -->
</ScreenOverlay>
Specifies a point on (or outside of) the overlay image that is mapped to the screen
coordinate (). It requires x and y values, and the units for those values.
The x and y values can be specified 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. x - Either the number of pixels, a fractional component of the image, or
a pixel inset indicating the x component of a point on the overlay image. y - Either
the number of pixels, a fractional component of the image, or a pixel inset indicating
the y component of a point on the overlay image. xunits - Units in which the x value
is specified. A value of "fraction" indicates the x value is a fraction of the image.
A value of "pixels" indicates the x value in pixels. A value of "insetPixels" indicates
the indent from the right edge of the image. yunits - Units in which the y value
is specified. A value of "fraction" indicates the y value is a fraction of the image.
A value of "pixels" indicates the y value in pixels. A value of "insetPixels" indicates
the indent from the top edge of the image.
Center the image:
Place the image on the top left: Place the image at the right of the screen:
For example, indicates
a point in the middle of the screen.
Here are some examples:
Place the image at the right of the screen:
Place the image on the top left:
Specifies a point relative to the screen origin that the overlay image is mapped
to. The x and y values can be specified 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. x - Either the number of pixels, a fractional component of the screen, or
a pixel inset indicating the x component of a point on the screen. y - Either the
number of pixels, a fractional component of the screen, or a pixel inset indicating
the y component of a point on the screen. xunits - Units in which the x value is
specified. A value of "fraction" indicates the x value is a fraction of the screen.
A value of "pixels" indicates the x value in pixels. A value of "insetPixels" indicates
the indent from the right edge of the screen. yunits - Units in which the y value
is specified. A value of fraction indicates the y value is a fraction of the screen.
A value of "pixels" indicates the y value in pixels. A value of "insetPixels" indicates
the indent from the top edge of the screen.
Specifies the size of the image for the screen overlay, as follows: 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
To force the image to resize to 100px by 500px:
To force the image to retain its horizontal dimension, but to take up 20 percent
of the vertical screen space:
To force the image to retain its original x and y dimensions, set the values to
−1:
To force the image to retain its original x and y dimensions, set the values to
−1: To force the image
to retain its horizontal dimension, but to take up 20 percent of the vertical screen
space: To force the image
to resize to 100px by 500px:
rotation
protected double rotation
Adjusts how the photo is placed inside the field of view. This element is useful
if your photo has been rotated and deviates slightly from a desired horizontal view.
Indicates the angle of rotation of the parent object. A value of 0 means no rotation.
The value is an angle in degrees counterclockwise starting from north. Use ±180
to indicate the rotation of the parent object from 0. The center of the ,
if not (.5,.5), is specified in .