I’ve been doing a bunch of Google Maps API v3 development lately, and I ran into an issue when loading kml layers onto a map. Tracks and points would work great, but any images were coming back as a 404 error. After some research and log watching I discovered the issue. The images for a kml are stored inside a kmz (zipped kml) file. These images are referenced to via a special script at http://www.google.com/mapsatt or maps.google.com/mapsatt.
I found that the API was trying to call
I found this article: http://notes.coldshore.com/google-maps-kmz-overlay-images-missing
I had a few problems with some KML files and some URL’s, so I found another way to do it:
Create an index.php script in a folder called “mapsatt” from the root of your web site. There’s only one line of PHP code necessary: