KML file shows blue marker instead of custom marker

470 views
Skip to first unread message

mikesamar

unread,
Oct 2, 2011, 8:51:52 AM10/2/11
to google-map...@googlegroups.com
Hello,

See: http://tech.reumer.net/test/t.html

The kml file shows blue markers instead of the defined custom markers. How can I solve this?

The kml file is made with maps.google.com.

I hope somebody can help me with the problem.

Kind regards Mike

Rossko

unread,
Oct 2, 2011, 9:04:57 AM10/2/11
to Google Maps JavaScript API v3
> See:http://tech.reumer.net/test/t.html
>
> The kml file shows blue markers instead of the defined custom markers.

Looks like a typo in your KML <IconStyle>
<href>http:////maps.gstatic.com/mapfiles/ms2/micons/
convienancestore.png</href>
isn't valid, default blue marker is substituted

geoco...@gmail.com

unread,
Oct 2, 2011, 9:25:03 AM10/2/11
to Google Maps JavaScript API v3
On Oct 2, 8:51 am, mikesamar <mikesa...@gmail.com> wrote:
> Hello,
>
> See:http://tech.reumer.net/test/t.html
>
> The kml file shows blue markers instead of the defined custom markers. How
> can I solve this?

Looks like each marker has its own style definition even though you
only use 4 different icons.
Seems like only the first 11 or so style declarations are being
honored (the rest use the "default" blue marker)

Perhaps you could change your kml to only use unique IconStyles.

(seems like an issue: KmlLayer will only display a limited number of
IconStyles)
Works fine with Google Maps:
http://maps.google.com/maps/ms?hl=en&ie=utf-8&msa=0&msid=215651189723776683977.0004ac32e3ada8cb3bb8c&output=kml

Strange as I have always thought that google maps and the google maps
APIs used the same KML rendering engine, seems like there are now
limits on the API one.

-- Larry

mikesamar

unread,
Oct 2, 2011, 10:50:54 AM10/2/11
to google-map...@googlegroups.com
Thanks Rossko,

But the url is valid and shows a shopping basket.

Kind regards Mike

geoco...@gmail.com

unread,
Oct 2, 2011, 10:52:49 AM10/2/11
to Google Maps JavaScript API v3

Rossko

unread,
Oct 2, 2011, 10:53:41 AM10/2/11
to Google Maps JavaScript API v3
> Works fine with Google Maps:http://maps.google.com/maps/ms?hl=en&ie=utf-8&msa=0&msid=215651189723...

I don't think it does? Looks to me like it doesn't display any marker
at all for those with typos in the IconStyle. See 'AM SAMUI PALACE'
at bottom of sidebar. But that is certainly different behaviour from
kmlLayer (and I would say less useful?)

mikesamar

unread,
Oct 2, 2011, 10:55:02 AM10/2/11
to google-map...@googlegroups.com
Hello Larry,

Thank you for the answer


Looks like each marker has its own style definition even though you
only use 4 different icons.
Seems like only the first 11 or so style declarations are being
honored (the rest use the "default" blue marker)

Perhaps you could change your kml to only use unique IconStyles.

The kml is generated by maps.google.com. I didn't define the kml file.I don't know how to influence maps.google.com to generate only unique icons.
 

(seems like an issue: KmlLayer will only display a limited number of
IconStyles)

Yes, this is my guess too. Very strange in works normal in Google Maps API version 2.
 
Works fine with Google Maps:
http://maps.google.com/maps/ms?hl=en&ie=utf-8&msa=0&msid=215651189723776683977.0004ac32e3ada8cb3bb8c&output=kml

Strange as I have always thought that google maps and the google maps
APIs used the same KML rendering engine, seems like there are now
limits on the API one.

This makes it even stranger

I changed the version number of the google maps api but that doesn't change the rendering of the kml file.

mikesamar

unread,
Oct 2, 2011, 11:00:34 AM10/2/11
to google-map...@googlegroups.com
Hello Rossko,

Sorry but I don't understand what you mean.

I see the correct bed icon for the 'AM SAMUI PALACE'
What do you see?

Regards Mike

geoco...@gmail.com

unread,
Oct 2, 2011, 11:42:59 AM10/2/11
to Google Maps JavaScript API v3
On Oct 2, 10:55 am, mikesamar <mikesa...@gmail.com> wrote:
> Hello Larry,
>
> Thank you for the answer
>
> > Looks like each marker has its own style definition even though you
> > only use 4 different icons.
> > Seems like only the first 11 or so style declarations are being
> > honored (the rest use the "default" blue marker)
>
> > Perhaps you could change your kml to only use unique IconStyles.
>
> The kml is generated by maps.google.com. I didn't define the kml file.I
> don't know how to influence maps.google.com to generate only unique icons.

I figured that was the case. I imported your kml into MyMaps and
couldn't figure out how to change it using that interface either.

If I hand edit the kml:
http://www.geocodezip.com/geoxml3_test/Samui_mod_kml.xml

Then it seems better (click on the "shared styles" button):
http://www.geocodezip.com/v3_KmlLayer_styleTest.html

(but I don't see the yellow icon, not sure why, probably a typo in my
hand edit)

-- Larry
>
>
>
> > (seems like an issue: KmlLayer will only display a limited number of
> > IconStyles)
>
> Yes, this is my guess too. Very strange in works normal in Google Maps API
> version 2.
>
> > Works fine with Google Maps:
>
> >http://maps.google.com/maps/ms?hl=en&ie=utf-8&msa=0&msid=215651189723...

geoco...@gmail.com

unread,
Oct 2, 2011, 11:46:00 AM10/2/11
to Google Maps JavaScript API v3
http://maps.google.com/maps?q=http:%2F%2Fwww.geocodezip.com%2Fgeoxml3_test%2FSamui_kml.xml&hl=en&ll=9.500196,100.053177&spn=0.187253,0.338173&t=m&z=12&vpsrc=0

Google seems to be having trouble with links posted in the group, the
link I posted didn't work for me either once it was in the group, does
the one above work?

-- Larry

mikesamar

unread,
Oct 2, 2011, 11:58:16 AM10/2/11
to google-map...@googlegroups.com
Hello Larry,

Yes if the kml file is corrected and uses shared styles then it shows allright.

It should not be necessary to edit the kml file to show it correctly by the API. This always worked allright.

I hope we can figure out what is causing the problem.

Regards Mike

geoco...@gmail.com

unread,
Oct 2, 2011, 11:58:44 AM10/2/11
to Google Maps JavaScript API v3
On Oct 2, 11:42 am, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Oct 2, 10:55 am, mikesamar <mikesa...@gmail.com> wrote:
>
> > Hello Larry,
>
> > Thank you for the answer
>
> > > Looks like each marker has its own style definition even though you
> > > only use 4 different icons.
> > > Seems like only the first 11 or so style declarations are being
> > > honored (the rest use the "default" blue marker)
>
> > > Perhaps you could change your kml to only use unique IconStyles.
>
> > The kml is generated by maps.google.com. I didn't define the kml file.I
> > don't know how to influence maps.google.com to generate only unique icons.
>
> I figured that was the case.  I imported your kml into MyMaps and
> couldn't figure out how to change it using that interface either.
>
> If I hand edit the kml:http://www.geocodezip.com/geoxml3_test/Samui_mod_kml.xml
>
> Then it seems better (click on the "shared styles" button):http://www.geocodezip.com/v3_KmlLayer_styleTest.html
>
> (but I don't see the yellow icon, not sure why, probably a typo in my
> hand edit)

or the "convienancestore" icon either...
But looking closer at the kml, there is an issue. The icons that
don't work have URLs that start with http:////maps.gstatic.com/...
whereas the ones that do start with http://maps.gstatic.com/...

I fixed those in the kml, should start working as soon as the tiles
expire from the cache.

There must be (or have been) some problem with the MyMaps icon
creation that allowed the "bad" urls to be saved for those icons.

mikesamar

unread,
Oct 2, 2011, 12:01:24 PM10/2/11
to google-map...@googlegroups.com
This link works for me.

I saw that the other link wasn't correct and copied the whole text instead of click on the link.

Rossko

unread,
Oct 2, 2011, 12:04:16 PM10/2/11
to Google Maps JavaScript API v3
> But looking closer at the kml, there is an issue.  The icons that
> don't work have URLs that start with http:////maps.gstatic.com/...

That's what I said :)

geoco...@gmail.com

unread,
Oct 2, 2011, 12:05:07 PM10/2/11
to Google Maps JavaScript API v3
On Oct 2, 11:58 am, mikesamar <mikesa...@gmail.com> wrote:
> Hello Larry,
>
> Yes if the kml file is corrected and uses shared styles then it shows
> allright.
>
> It should not be necessary to edit the kml file to show it correctly by the
> API. This always worked allright.

I agree.

>
> I hope we can figure out what is causing the problem.

Seems like a bug in MyMaps, it shouldn't create a unique style for
every placemark particularly when you can only choose the icons from a
menu.

-- Larry

>
> Regards Mike

geoco...@gmail.com

unread,
Oct 2, 2011, 12:10:04 PM10/2/11
to Google Maps JavaScript API v3
You said "typo", I thought you were referring to convienance (which
is spelled wrong, should be convienence...)
But there is an icon with that spelling.

Either something has changed in MyMaps such that it is now creating
URLs with extra backslashes, or something changed in the KmlLayer
parser such that it no longer accepts URLs with extra backslashes.

-- Larry

mikesamar

unread,
Oct 2, 2011, 12:17:06 PM10/2/11
to google-map...@googlegroups.com
Rossko, I thought too that you reffer to the name and not to the ////.

So we have two problems in MyMaps:
  • creates multiple styles for same icon styles
  • add extra slashed to the url of icons
Where can I create an issue for MyMaps so it can be solved?

Should we also make an issue for kmllayer too?

geoco...@gmail.com

unread,
Oct 2, 2011, 12:27:45 PM10/2/11
to Google Maps JavaScript API v3
On Oct 2, 12:17 pm, mikesamar <mikesa...@gmail.com> wrote:
> Rossko, I thought too that you reffer to the name and not to the ////.
>
> So we have two problems in MyMaps:
>
>    - creates multiple styles for same icon styles
>    - add extra slashed to the url of icons
>
> Where can I create an issue for MyMaps so it can be solved?

Looks like this will get you to the right place (it wasn't easy to
find...):
http://maps.google.com/support/bin/static.py?page=known_issues.cs

>
> Should we also make an issue for kmllayer too?

I would think so, it seems to have a problem with the http://// which
seems to work with Google Maps.

-- Larry

mikesamar

unread,
Oct 2, 2011, 1:24:44 PM10/2/11
to google-map...@googlegroups.com
>
> So we have two problems in MyMaps:
>
>    - creates multiple styles for same icon styles
>    - add extra slashed to the url of icons
>
> Where can I create an issue for MyMaps so it can be solved?

Looks like this will get you to the right place (it wasn't easy to
find...):
http://maps.google.com/support/bin/static.py?page=known_issues.cs

>
> Should we also make an issue for kmllayer too?

I would think so, it seems to have a problem with the http://// which
seems to work with Google Maps.

geoco...@gmail.com

unread,
Oct 2, 2011, 2:42:38 PM10/2/11
to Google Maps JavaScript API v3
On Oct 2, 1:24 pm, mikesamar <mikesa...@gmail.com> wrote:
> > > So we have two problems in MyMaps:
>
> > >    - creates multiple styles for same icon styles
> > >    - add extra slashed to the url of icons
>
> > > Where can I create an issue for MyMaps so it can be solved?
>
> > Looks like this will get you to the right place (it wasn't easy to
> > find...):
> >http://maps.google.com/support/bin/static.py?page=known_issues.cs
>
> > I've create a help subject, see:
>
> http://www.google.com/support/forum/p/maps/thread?tid=32aeec9a5e55d90...
> > > Should we also make an issue for kmllayer too?
>
> > I would think so, it seems to have a problem with the http://// which
> > seems to work with Google Maps.
>
> >  Made an issue too for kmllayer, see:
>
> http://code.google.com/p/gmaps-api-issues/issues/detail?id=3662

FYI - fixing the slashes solves the issue (even with all the
extraneous style declarations), so that is what seems to have changed
(the handling of those URLs by KmlLayer)

I added a verion of the kml with just the slash fix to this test page:

http://www.geocodezip.com/v3_KmlLayer_styleTest.html


-- Larry

mikesamar

unread,
Oct 2, 2011, 4:16:06 PM10/2/11
to google-map...@googlegroups.com
Hello Larry,

Thanks for adding the extra information.

Kind regards Mike

Rossko

unread,
Oct 2, 2011, 4:23:48 PM10/2/11
to Google Maps JavaScript API v3
> I would think so, it seems to have a problem with the http://// which
> seems to work with Google Maps.

I'd say kmlLayer was acting reasonably by substituting the default
blue marker for a rubbish icon url, not sure what is wanted by
reporting a bug about that?

I definately saw maps.google.com substitute no marker at all for the
rubbish icon urls. It is arguable whether it 'ought' to or not; after
all if the KML is rubbish then results aren't really predictable.
Seeing as they have kmlLayer make a substitution it would seem
reasonable that maps.google.com could/should as well. But that's an
issue against maps.google.com ?

I'd guess this whole effect was changing while we were all looking at
it. I suppose it is also possible that kmlLayer and maps.google.com
may maintain different KML caches to add confusion.

Just to add for the record, even if the effect is no longer visible, I
can confirm seeing the real root issue that the My Maps KML output
included many IconStyle with href beginning http:////....
I didn't keep a copy but it would be appear to have been the later or
last ten or so styles of thirty or so. I couldn't say if the effect
started at the point where similar/duplicate styles changed to abother
icon, it might have been.

Rossko

unread,
Oct 2, 2011, 4:36:56 PM10/2/11
to Google Maps JavaScript API v3
aha, dug around I do have a copy of the KML.

I suspect an April Fool?! the //// effect starts at id="style13" and
continues consistently.
It's not the thirteenth style, they are not in order, its the
fourteenth

geoco...@gmail.com

unread,
Oct 2, 2011, 6:09:11 PM10/2/11
to Google Maps JavaScript API v3
On Oct 2, 4:23 pm, Rossko <ros...@culzean.clara.co.uk> wrote:
> > I would think so, it seems to have a problem with the http://// which
> > seems to work with Google Maps.
>
> I'd say kmlLayer was acting reasonably by substituting the default
> blue marker for a rubbish icon url, not sure what is wanted by
> reporting a bug about that?

I don't know what changed when. If google maps works with the kml
generated from MyMaps then KmlLayer should also. The fact that it is
technically invalid isn't really relevant, although if the kml
generated from MyMaps is fixed, then it wouldn't be necessary to
report a bug on KmlLayer.

>
> I definately saw maps.google.com substitute no marker at all for the
> rubbish icon urls.  

I never saw that, it always worked on Google Maps for me (but I am in
the US, so probably get the API, associated services and Google Maps
from a different server than you do).

> It is arguable whether it 'ought' to or not; after
> all if the KML is rubbish then results aren't really predictable.
> Seeing as they have kmlLayer make a substitution it would seem
> reasonable that maps.google.com could/should as well.  But that's an
> issue against maps.google.com ?

The main point is they need to work together. The both come from
google. I really don't know how long it takes to fix problems with
MyMaps, but I know there is active development going on in the v3
API. I don't know if the change that broke this was in the v3 API or
in MyMaps.

>
> I'd guess this whole effect was changing while we were all looking at
> it.  I suppose it is also possible that kmlLayer and maps.google.com
> may maintain different KML caches to add confusion.
>
> Just to add for the record, even if the effect is no longer visible, I
> can confirm seeing the real root issue that the My Maps KML output
> included many IconStyle with href beginning http:////....
> I didn't keep a copy but it would be appear to have been the later or
> last ten or so styles of thirty or so.  I couldn't say if the effect
> started at the point where similar/duplicate styles changed to abother
> icon, it might have been.

The file:

http://www.geocodezip.com/geoxml3_test/Samui_kml.xml

is the file I downloaded from Google MyMaps, and has those URLs in it.

-- Larry

Rossko

unread,
Oct 3, 2011, 4:44:03 AM10/3/11
to Google Maps JavaScript API v3
> > I definately saw maps.google.com substitute no marker at all for the
> > rubbish icon urls.  
>
> I never saw that, it always worked on Google Maps for me (but I am in
> the US, so probably get the API, associated services and Google Maps
> from a different server than you do).

Now that is curious. Your captured example of the KML still has
'invisible' markers for me, such as AM SAMUI PALACE, right now. (And
yes that is a view from the UK)

Joseph Elfelt

unread,
Oct 3, 2011, 8:39:56 AM10/3/11
to Google Maps JavaScript API v3
I have looked at the KML code for a number of MyMaps (now MyPlaces)
over the last few years. To the best of my knowledge Google Maps has
always used a unique style for each marker even when all the markers
on a map were the same. I do not recall ever seeing a shared style in
those KML files.

I am guessing that the reason for that is to make it easy for Google
to let the user change any marker image.

geoco...@gmail.com

unread,
Oct 3, 2011, 9:36:12 AM10/3/11
to Google Maps JavaScript API v3
Joe,
Do you have any historical evidence for the http://// vs http:// in
the URLs of the icons in kml files generated by MyMaps/MyPlaces?

-- Larry

Joseph Elfelt

unread,
Oct 3, 2011, 11:33:08 AM10/3/11
to Google Maps JavaScript API v3
The MyMaps help forum has chatter related to this issue.
http://www.google.com/support/forum/p/maps/label?lid=11b743e93acfcc52&hl=en

Here are some links that will let you download KML files that were
made by Google to hold someone's MyMap.
The date should be the last time the file was modified.

You can display these files on Google Maps simply by entering the
complete URL into the 'maps' search window.

You can also display these files on Gmap4 just by changing the msid
value:
http://www.mappingsupport.com/p/gmap4.php?q=mymap,100059448823219015761.0004787c6d8cab9b25399
=======================

1-2-2010
I did not make this map. Maybe the author *wanted* some blue
paddles.
Most <href> tags do not start with http, thus further clouding
matters.
http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&output=nl&msid=100059448823219015761.0004787c6d8cab9b25399&output=kml

Example styles:

<Style id="style14">
<IconStyle>
<Icon>
<href>/mapfiles/kml/paddle/grn-circle_maps.png</href>
</Icon>
</IconStyle>
</Style>

<Style id="style13">
<IconStyle>
<Icon>
<href>/mapfiles/kml/pushpin/blue-pushpin_maps.png</href>
</Icon>
</IconStyle>
</Style>
==========================

2-10-2010
I did make this MyMap.
There are well over 15 green paddles.
http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&output=nl&msid=105432215366276592381.00047f483776c3552b1fd&output=kml

In the Google KML file each paddle has its own style and all styles
are the same:
<Style id="style1">
<IconStyle>
<Icon>
<href>http://maps.gstatic.com/intl/en_us/mapfiles/ms/micons/
green-dot.png</href>
</Icon>
</IconStyle>
</Style>

mikesamar

unread,
Oct 3, 2011, 2:46:33 PM10/3/11
to google-map...@googlegroups.com
 

I'd say kmlLayer was acting reasonably by substituting the default
blue marker for a rubbish icon url, not sure what is wanted by
reporting a bug about that?


I know that maps.google.com has for a couplke of years the //// for urls to icon. I don't know when that started.
This worked in Google Maps version 2 allrightand for google maps ai version 3 this worked also allright. This changed recently. So I hope they can revert the changes.

I agree that it's better to change maps.google.com so it won't generate wrong kml files.

mikesamar

unread,
Oct 3, 2011, 2:54:57 PM10/3/11
to google-map...@googlegroups.com
Is there another way to report a bug in maps.google.com instead of a help question?

I don't have good experience with help questions

Barry Hunter

unread,
Oct 3, 2011, 4:50:24 PM10/3/11
to google-map...@googlegroups.com
Google are aware of the issue on Google Maps. They are working on it.
I've heard this direct from a Google Employee just today.

This thread also has some activity from Google
http://www.google.com/support/forum/p/maps/thread?hl=en&tid=4b9d40586abf4c3f
showing they are aware.

> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-maps-js-api-v3/-/WxDxDNtcABMJ.
> 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.
>

mikesamar

unread,
Oct 3, 2011, 4:59:06 PM10/3/11
to google-map...@googlegroups.com
Great news. I hope they find it very soon.

mikesamar

unread,
Oct 8, 2011, 3:34:56 AM10/8/11
to google-map...@googlegroups.com
It looks like it's solved.

My example is working allright and I checked the kml file for changes:
  • All url's to icons have // and nomore ////
  • Still duplicate icon style definitions
You may need to do a hard refresh to see it because of browser cache.

The examples of Larry are kml files instead of export of maps.google.com and still show the problem of //// in kmllayer.

Shall we close the issue on kmllayer?

I'll inform the help community.
Reply all
Reply to author
Forward
0 new messages