[kml-support] NetworkLinkControl not updating in Google Maps, works fine in Google Earth

70 views
Skip to first unread message

JohnRiz

unread,
May 7, 2010, 9:30:55 AM5/7/10
to KML Developer Support - Getting Started with KML
Hello,

I hope someone can help..

I have a KML file, which loads two other KML files via NetworkLinks
The loader file is here:
http://bumbleware.co.uk/loader.kml

The first KML that loads up is going to draw some shapes, to keep it
simple I have just one shape in there now, the shape has an id of
"shape1". This shapes file can be found here:
http://bumbleware.co.uk/shapes.kml

Then I want the second KML file from the loader to update the shape
from the first file, so I have a KML file "updates.kml" with a
NetworkLinkControl referencing the first shapes file, and trying to
rename the shape.
This file is here:
http://bumbleware.co.uk/updates.kml

The whole thing works perfectly when I load the single loader file
into Google Earth, the shape is drawn, then the name is changed by the
updates.kml file.

However when I try and do this using Google Maps (either v2, or v3)
the loader only manages to load the shapes file, it looks like the
updates.kml is not taking effect.
Does anyone know why this might be?

Both v2 and v3 versions of the google maps efforts can be found here:
http://bumbleware.co.uk/mapsversion2.htm
http://bumbleware.co.uk/mapsversion3.htm
You can see in both cases the Shape1 does not get it's updated
description from the updates.kml file, like it does when the loader is
opened in Google Earth

Thanks in advance!

John

--
You received this message because you are subscribed to the Google Groups "Getting Started with KML" group.
To post to this group, send email to kml-support-g...@googlegroups.com.
To unsubscribe from this group, send email to kml-support-getting...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/kml-support-getting-started?hl=en.

JohnRiz

unread,
May 7, 2010, 9:52:05 AM5/7/10
to KML Developer Support - Getting Started with KML
Addition:
I realised someone might point me in the direction of the MIME types,
since the I can't change the httpd.conf on the bumbleware site so I
made a mirror copy of the site on IIS where I have correctly set the
mime types. It's running here:
http://demo.qresearch.org/mapsversion3.htm (loader and other KML files
updated to work from this domain too!)

Problem is the same with the mime types correctly set. i.e. Works in
GE, not in Google Maps.

Ta!

John

On May 7, 2:30 pm, JohnRiz wrote:
> Hello,
>
> I hope someone can help..
>
> I have a KML file, which loads two other KML files via NetworkLinks
> The loader file is here:http://bumbleware.co.uk/loader.kml
>
> The first KML that loads up is going to draw some shapes, to keep it
> simple I have just one shape in there now, the shape has an id of
> "shape1". This shapes file can be found here:http://bumbleware.co.uk/shapes.kml
>
> Then I want the second KML file from the loader to update the shape
> from the first file, so I have a KML file "updates.kml" with a
> NetworkLinkControl referencing the first shapes file, and trying to
> rename the shape.
> This file is here:http://bumbleware.co.uk/updates.kml
>
> The whole thing works perfectly when I load the single loader file
> into Google Earth, the shape is drawn, then the name is changed by the
> updates.kml file.
>
> However when I try and do this using Google Maps (either v2, or v3)
> the loader only manages to load the shapes file, it looks like the
> updates.kml is not taking effect.
> Does anyone know why this might be?
>
> Both v2 and v3 versions of the google maps efforts can be found here:http://bumbleware.co.uk/mapsversion2.htmhttp://bumbleware.co.uk/mapsversion3.htm
> You can see in both cases the Shape1 does not get it's updated
> description from the updates.kml file, like it does when the loader is
> opened in Google Earth
>
> Thanks in advance!
>
> John
>
> --
> You received this message because you are subscribed to the Google Groups "Getting Started with KML" group.
> To post to this group, send email to [email address].
> To unsubscribe from this group, send email to [email address].

JohnRiz

unread,
May 7, 2010, 11:03:47 AM5/7/10
to KML Developer Support - Getting Started with KML
Another addition..

I've found some documentation that says updates are only supported in
Google Maps for styles:
http://code.google.com/apis/kml/documentation/kmlelementsinmaps.html#notes

"
<NetworkLinkControl> partially <Update> and <expires> partially
supported (see Notes section above)
<Update> partially only style changes, not <Create> or <Delete>
"

So I've changed my code to simply update the shapes style by changing
the styleUrl
It's running here:

http://demo.qresearch.org/2/mapsversion2.htm

It still doesn't work though, the polygon remains the style that it is
set in the initial file (a blue circle), rather than the update that I
want to apply (yellowLineGreenPoly)
I'm out of ideas and clutching at straws now. I'd better stop posting
and let someone respond...

John


On May 7, 2:52 pm, JohnRiz wrote:
> Addition:
> I realised someone might point me in the direction of the MIME types,
> since the I can't change the httpd.conf on the bumbleware site so I
> made a mirror copy of the site on IIS where I have correctly set the
> mime types. It's running here:http://demo.qresearch.org/mapsversion3.htm(loader and other KML files
> > Both v2 and v3 versions of the google maps efforts can be found here:http://bumbleware.co.uk/mapsversion2.htmhttp://bumbleware.co.uk/mapsv...

Rossko

unread,
May 7, 2010, 1:36:11 PM5/7/10
to KML Developer Support - Getting Started with KML
> http://demo.qresearch.org/2/mapsversion2.htm

No map in FF2 ; I think because of the use of self-closing tag
<script ... />
See
http://www.webmasterworld.com/html/3614746.htm

I note that your updates.kml contains indirection, referring to a
style in another seperate KML not previously referred to
(styles.kml). Maybe the GGeoXml parser can't cope with that depth of
indirection, it does have many limitations. What happens if you
change colour style directly in updates.kml?

JohnRiz

unread,
May 7, 2010, 1:52:43 PM5/7/10
to KML Developer Support - Getting Started with KML
Cheers Rossko
I've fixed the </script> for FF now, well spotted.

I tried a few ways of changing the colour style, both using styles
embedded in update.kml and also in shapes.kml, neither worked in
Google Maps.
I'm now thinking that because it works perfectly in Google Earth,
maybe the documentation for Google Maps isn't quite right, and that
changing the style is not supported afterall.
I hope I am wrong and someone can point out what I've missed though...

My fallback option I guess would be to embed a Google Earth viewer
object in the page...

John

On May 7, 6:36 pm, Rossko wrote:
> >http://demo.qresearch.org/2/mapsversion2.htm
>
> No map in FF2 ; I think because of the use of self-closing tag
> <script ... />
> Seehttp://www.webmasterworld.com/html/3614746.htm
>
> I note that your updates.kml contains indirection, referring to a
> style in another seperate KML not previously referred to
> (styles.kml).   Maybe the GGeoXml parser can't cope with that depth of
> indirection, it does have many limitations.  What happens if you
> change colour style directly in updates.kml?
>
> --
> You received this message because you are subscribed to the Google Groups "Getting Started with KML" group.
> To post to this group, send email to [email address].
> To unsubscribe from this group, send email to [email address].

JohnRiz

unread,
May 10, 2010, 9:09:42 AM5/10/10
to KML Developer Support - Getting Started with KML
Still looking for an answer I came across this person:
http://groups.google.com/group/kml-support-server-side-scripting/browse_thread/thread/e5eea4917e3ca409/dda403e6baa42463#dda403e6baa42463
..who seems to be having the same issues as me, i.e. Style updates
working in GE not GMaps.
Although they are changing the style in a different way (using a
targetId on the style element)

It would be good to hear from someone who has managed to change the
style of an element using NetworkLinkUpdates in Google Maps, I would
have thought it was a pretty common thing (1 static file holds shapes,
the 2nd is used to dynamically change their colour based on some
changing data)

Cheers!

John

pureabsolute

unread,
Jan 20, 2012, 6:35:30 PM1/20/12
to kml-support-g...@googlegroups.com
Hi John,

Any chance you found out what was going wrong?

I have a slightly different problem -- updating a StyleLabel tag in GoogleEarth is not doing anything for me.

I'm gathering information for now ;)

G.

Reply all
Reply to author
Forward
0 new messages