Hi All,
I've seen this question asked a few times, but have yet to find an
answer that works for me...
I have a KML file, with custom icons, that works perfectly in Google
Earth. A copy of this file can be found here:
http://christophermolloy.com/a/Tokyo.kml
But when I create a map in Google Maps and import this KML file, none
of the custom icons are displayed:
http://maps.google.com/?mid=1253661696
The icons load fine by themselves (e.g.
http://www.christophermolloy.com/ge/0101.png
)
If I inspect the map page source I see the following element in place
of my custom icons:
<img style="border: 0px none ; margin: 0px; padding: 0px; width: 32px;
height: 32px; -moz-user-select: none;" src="
http://maps.gstatic.com/
intl/en_ALL/mapfiles/transparent.png"/>
Further investigation led me to:
http://code.google.com/apis/kml/documentation/kmlreference.html#placemark
which states that the way to specify an icon (amongst other things) is
to use the '<styleUrl>...</styleUrl>' tag set (which is what I've done
in my KML).
However,
http://code.google.com/apis/kml/documentation/kmlelementsinmaps.html
states that '<styleUrl>' is not supported in Maps (as it applies to
<StyleMap>, which is not supported in Maps). The '<Style>' tag is
supported in Maps, however.
And here's where I hit a brick wall. So - am I doing something wrong?
What's the best way to specify a custom icon for a placemark such that
it will display in Google Maps? Alternatively, can anyone point me to
a KML file that uses custom (.PNG) icons that does work in Maps (so I
can dig through the KML myself)?
Any help would be greatly appreciated!