[Google Maps API v3] KML Icons

91 views
Skip to first unread message

Jonathanccwong

unread,
May 13, 2010, 2:19:04 PM5/13/10
to Google Maps JavaScript API v3
Hi I am following the example KML feature data example
from here:
http://code.google.com/apis/maps/documentation/v3/overlays.html#KMLLayers

and I am using that KML file as a basis to get to understand what can
be done with KMLLayers.
However while I was looking, i see that the markers should all have
pictures associated with it and not the blue marker on the example
map.
the <icon> tag should make the picture as the marker am I correct?

I checked this out on aother website using the same KML file, and I
see the picture icons correctly.
http://display-kml.appspot.com/ They seem to be using the maps v2 API.

I was wondering if there is a bug in the Maps v3 API that it doesn't
show icons correctly.

Jon

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Rossko

unread,
May 13, 2010, 4:45:00 PM5/13/10
to Google Maps JavaScript API v3
> I was wondering if there is a bug in the Maps v3 API that it doesn't
> show icons correctly.

It might not be a bug so much as some clever behaviour.

The example KML http://www.searcharoo.net/SearchKml/newyork.kml is
actually quite atypical, attempting to use large format photos (350kb
worth at 1000x540 pixels) as an Icon.

In v2 maps using GGeoXml, it is a limitation that icons are always
32x32 pixels, so you get the shrunk photo.

I suspect the v3 KML parser may be smarter than that, and substituting
a default blue marker for icons it sees as unreasonable?
"Unreasonable" could for example be where the icon is bigger than the
map ...

Jonathanccwong

unread,
May 13, 2010, 5:59:50 PM5/13/10
to Google Maps JavaScript API v3
Thanks That's good to know.

I'll try to make a custom KML that uses smaller icons and see if that
is an issue.

Jon
Reply all
Reply to author
Forward
0 new messages