fastkml
fastkml copied to clipboard
Add PhotoOverlay support
https://developers.google.com/kml/documentation/kmlreference#photooverlay
https://www.youtube.com/watch?v=-rSYFwcWVnc
That's pretty cool with the 3d overlay. I think in the regular standard they really only do 2D though?
Hi, we are also interested in this
<PhotoOverlay>
Syntax
<PhotoOverlay>
<!-- inherited from Feature element -->
<name>...</name> <!-- string -->
<visibility>1</visibility> <!-- boolean -->
<open>0</open> <!-- boolean -->
<atom:author>...<atom:author> <!-- xmlns:atom -->
<atom:link href=" "/> <!-- 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>
<href>...</href> <!-- anyURI -->
...
</Icon>
<!-- specific to PhotoOverlay -->
<rotation>0</rotation> <!-- kml:angle180 -->
<ViewVolume>
<leftFov>0</leftFov> <!-- kml:angle180 -->
<rightFov>0</rightFov> <!-- kml:angle180 -->
<bottomFov>0</bottomFov> <!-- kml:angle90 -->
<topFov>0</topFov> <!-- kml:angle90 -->
<near>0</near> <!-- double -->
</ViewVolume>
<ImagePyramid>
<tileSize>256</tileSize> <!-- int -->
<maxWidth>...</maxWidth> <!-- int -->
<maxHeight>...</maxHeight> <!-- int -->
<gridOrigin>lowerLeft</gridOrigin> <!-- lowerLeft or upperLeft -->
</ImagePyramid>
<Point>
<coordinates>...</coordinates> <!-- lon,lat[,alt] -->
</Point>
<shape>rectangle</shape> <!-- kml:shape -->
</PhotoOverlay>
Description
The <PhotoOverlay>
element allows you to geographically locate a photograph on the Earth and to specify viewing parameters for this PhotoOverlay. The PhotoOverlay can be a simple 2D rectangle, a partial or full cylinder, or a sphere (for spherical panoramas). The overlay is placed at the specified location and oriented toward the viewpoint.
Because <PhotoOverlay>
is derived from <Feature>
, it can contain one of the two elements derived from <AbstractView>
—either <Camera>
or <LookAt>
. The Camera (or LookAt) specifies a viewpoint and a viewing direction (also referred to as a view vector). The PhotoOverlay is positioned in relation to the viewpoint. Specifically, the plane of a 2D rectangular image is orthogonal (at right angles to) the view vector. The normal of this plane—that is, its front, which is the part with the photo—is oriented toward the viewpoint.
The URL for the PhotoOverlay image is specified in the <Icon>
tag #131, which is inherited from <Overlay>
. The <Icon>
tag must contain an <href>
element that specifies the image file to use for the PhotoOverlay. In the case of a very large image, the
"Topics in KML" page on PhotoOverlay.