KML styleurl's intermittently working / not working when displaying kml using Google maps

258 views
Skip to first unread message

Paulweb

unread,
Jan 17, 2012, 12:26:27 PM1/17/12
to google-map...@googlegroups.com
I've an intermittent problem where the styleurl's in my kml document i display using Google maps are sometimes ignored (all markers come out as standard blue) and sometimes respected correctly. Bizarrely sometimes they work and don't work on the same screen - certain tiles of Googlemap will show correctly styled markers and other tiles unstyled markers.

This happens even if displaying kml on Google maps website itself

Anyone else have this problem? It is intermittent in all browsers.

Paulweb

unread,
Jan 17, 2012, 12:33:56 PM1/17/12
to google-map...@googlegroups.com
Here's an example screenshot where some bits of the map are showing the styled placemarks and others unstyled. 
mapserror.JPG

krisss

unread,
Apr 19, 2012, 4:00:02 AM4/19/12
to google-map...@googlegroups.com
Hello!
I've got the same problem, sometimes it works,  and sometimes not...  Sometimes i've got blue marker and custom icon on the same screen!
 

I use a KMZ , packed with the customicon with relative path.  

My kmz seems ok in googleMap, googleearth...and usualy i've got no problem...but sometimes... this thing happens  !

Do you have found a solution ?

thx!

krisss

unread,
Apr 19, 2012, 4:07:15 AM4/19/12
to google-map...@googlegroups.com

Barry Hunter

unread,
Apr 19, 2012, 9:11:35 AM4/19/12
to google-map...@googlegroups.com
Pretty sure this is not a problem with the KML as such.

Rather a limitation of Google Maps. It will only show a certain amount
of 'styled' content. Then it defaults back and uses unstyled icons
etc.

Google havent been forthcoming on what the limits are, and how they
enforced (per tile, per kml etc)


If want full control, best to use a third party KML parser (not sure
if any have inbuilt KMZ support)

geoco...@gmail.com

unread,
Apr 19, 2012, 9:21:57 AM4/19/12
to Google Maps JavaScript API v3
There is now a version of geoxml3 that supports kmz natively (no
promises on performance):
http://code.google.com/p/geoxml3/source/browse/#svn%2Fbranches%2Fkmz

Larry

Christophe HARDY

unread,
Apr 19, 2012, 9:32:14 AM4/19/12
to google-map...@googlegroups.com
Thanks for the reply!

My KMZ is generally small...only 10-20 features and two styles.

I use a KMZ format , packed with the icons to avoid cache problem, it works
better than KML and style with absolute URL.
I read somewhere that the <StyleURL> tag doesn't work very well, and so I
try to use inline style inside the KMZ today. It's not very clean but
perhaps it works!

Otherwise, I'll try a KML parser!


-----Message d'origine-----
De : google-map...@googlegroups.com
[mailto:google-map...@googlegroups.com] De la part de Barry Hunter
Envoyé : jeudi 19 avril 2012 15:12
À : google-map...@googlegroups.com
Objet : Re: [Google Maps API v3] Re: KML styleurl's intermittently working /
not working when displaying kml using Google maps

--
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.


Reply all
Reply to author
Forward
0 new messages