fastkml icon indicating copy to clipboard operation
fastkml copied to clipboard

Add PhotoOverlay support

Open IanLee1521 opened this issue 10 years ago • 4 comments

https://developers.google.com/kml/documentation/kmlreference#photooverlay

IanLee1521 avatar Sep 22 '14 08:09 IanLee1521

https://www.youtube.com/watch?v=-rSYFwcWVnc

cleder avatar Nov 19 '14 14:11 cleder

That's pretty cool with the 3d overlay. I think in the regular standard they really only do 2D though?

IanLee1521 avatar Nov 22 '14 19:11 IanLee1521

Hi, we are also interested in this

martimpassos avatar Oct 19 '21 21:10 martimpassos

<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 is a special URL that indexes into a pyramid of images of varying resolutions (see ImagePyramid).

"Topics in KML" page on PhotoOverlay.

cleder avatar Oct 20 '21 07:10 cleder