0

I have tried with overlay and Placemark, I store my photo and KML together in one KMZ but when I open with Google Earth, I only can see the text in the location, not the photo. Here is my code:

[?xml version='1.0' encoding='UTF-8'?] 
[kml xmlns='http://www.opengis.net/kml/2.2'] 
[Document] 
[name] Bungay[/name]
[description]Photos.  Walking distance from Home.
[/description] 
[PhotoOverlay id="photo1"] 
[name] 
Garden1.jpg 
[/name] 
[Icon] 
[href] 
Garden1.jpg
[/href] 
[/Icon] 
[Point] 
[coordinates] 
1.4517828,52.4515304,0
[/coordinates] 
[/Point] 
[/PhotoOverlay] 
[/Document] 

[/kml] 

And with Placemark :

[?xml version='1.0' encoding='UTF-8'?] 
[kml xmlns='http://www.opengis.net/kml/2.2'] 
[Document] 
[name] Bungay[/name] 
[description] Photos.  Walking distance from Home.
[/description] 
[Placemark] 
[Icon] 
[href] Garden1.jpg[/href] 
[/Icon] 
[name] Garden1[/name]           
[ExtendedData] 
[Data name='Group']        
[value] Garden [/value] 
[/Data]       
[/ExtendedData]       
[address] [/address] 
[Point] 
[coordinates>1.4517828,52.4515304,0
[/coordinates] 
[/Point] 
[/Placemark] 
[/Document] 

[/kml]
  • KML normally uses triangular brackets '<....>' not square ones '[....]' - I'm not experienced enough to tell you that square brackets are a problem... but I was surprised to see them in your file and in the absence of any better advice I'd check that this isn't where the problem lies. My second suggestion - load a photo directly in Google Earth, then export a KML. Compare this KML with your own... – Rostranimin Feb 1 at 16:04
  • Rostranimin is right, no square brackets, try angle brackets. Once you get that working, let us know exactly what you're trying to do. A PhotoOverlay is a rarely used KML feature that allows you to place a photo in 3D space, like a billboard in the 3D world of Google Earth. It requires a lot of info about photo positions and view angles to do it right. Using a normal point Placemark is best in most cases, and there it's easiest to include a photo as an image in the description/balloon content (via an HTML <img...> tag). Your 2nd example uses the photo as the small icon on the map. – Christiaan Adams Feb 1 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.