My iPad app pops the Google Earth app via UIApplication:openURL:
and passes it a URL of a file to display. The file displays fine, except for Camera
and LookAt
tags. It seems that the Camera
tag is totally disregarded, while the LookAt
is partially processed such that the point of view moves to a point close to the ground, much lower than the LookAt
specification.
To debug this, I created two KMLs, copied from Google's documentation. The content is generated by a query on my server. The query's URL is passed to the Google Earth app from my app.
For comparison, I opened the same data on Google Earth running on a Mac. It works fine there.
This file is treated as a no-op by GE - it does not move its point of view at all:
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<Camera>
<longitude>-122.4783</longitude>
<latitude>37.8120</latitude>
<altitude>100</altitude>
<heading>90</heading>
<tilt>90</tilt>
<altitudeMode>absolute</altitudeMode>
</Camera>
</Placemark>
</Document>
</kml>
The following does move the point of view to the general area, but to a point which is exactly 500 meters above the ground, regardless of the range
value.
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<name>Machu Picchu, Peru</name>
<LookAt>
<longitude>-72.503364</longitude>
<latitude>-13.209676</latitude>
<altitude>0</altitude>
<range>14794.882995</range>
<tilt>66.768762</tilt>
<heading>71.131493</heading>
</LookAt>
<styleUrl>#msn_icon12</styleUrl>
<Point>
<coordinates>-72.516244,-13.162806,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>
I am using Google Earth 7.0.0.7455 on the iPad.
Any other tag that I passed to the GE app, such as for drawing polygons, works just fine. I'm only having trouble with Camera
and LookAt
.
I wonder if it's my bug, Google's, or both. If Google's, is there a workaround - any way of setting the camera?
Placemark
s and still the camera does not work, (2) the KML fragment above, without thePlacemark
work well on a desktop.