hendriksaragih / kml-samples

Automatically exported from code.google.com/p/kml-samples
0 stars 0 forks source link

using <update> to change the visibilility of a folder fails if folder has child elements #225

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which products are affected?
Google Earth 4.3

What steps will reproduce the problem?
1. Load a KML file with two test folders: one with no child elements
(id="fld0") and one with one or more child elements (id="fld1")

---------------------------------------------------------------
http://localhost:8000/main.kml
(This file is loaded into GEarth via a network link)
---------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document>
    <name>KmlFile</name>
    <Folder>
        <name>Test Container</name>
        <open>1</open>
        <NetworkLink>
            <name>Update Network Link</name>
            <Link>
                <href>http://localhost:8000/update/visibility_test.kml</href>
            </Link>
        </NetworkLink>
        <Folder id="fld0">
            <name>Test Folder</name>
        </Folder>
        <Folder id="fld1">
            <name>Test Folder w/ Child Element</name>
            <open>1</open>
            <Placemark id="pt1">
                <name>Sample Placemark</name>
            </Placemark>
        </Folder>
    </Folder>
</Document>
</kml>

2. Create an KML file that attempts to update the visibility of the two
folders.

---------------------------------------
http://localhost:8000/update/visibility_test.kml
---------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <NetworkLinkControl>
    <Update>
      <targetHref>http://localhost:8000/main.kml</targetHref>
      <Change>
        <Folder targetId="fld0">
          <visibility>0</visibility>
        </Folder>
        <Folder targetId="fld1">
          <visibility>0</visibility>
        </Folder>
      </Change>
    </Update>
  </NetworkLinkControl>
</kml>

3. Refresh the Network Link that refers to the update file.

What is the expected output or behavior? What do you see instead?
I would expect that both of the folders would become visible.  However,
only the folder with no child elements becomes visible, while the folder
with a child element is not affected.  A user can change the visibility of
individual child elements, this is not practical in most cases.

What application versions (if any) are you using?
Google Earth
4.3.7284.3916 (beta)
Build Date Jul 8 2008
Build Time 18:49:58
Renderer OpenGL
Operating System Linux (2.6.27.0)
Video Driver NVIDIA Corporation
Max Texture Size 8192x8192
Server kh.google.com

Which operating systems and browsers are affected?
Linux

Please provide any additional information (code snippets/links) below.

Original issue reported on code.google.com by tylerick...@gmail.com on 22 Jan 2009 at 10:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This issue was reposted on the earth-issues tracking list, because it seems to 
be
more of a Google Earth issue rather than a KML issue.
See: http://code.google.com/p/earth-issues/issues/detail?id=73

Original comment by tylerick...@gmail.com on 23 Jan 2009 at 1:35

GoogleCodeExporter commented 9 years ago
Thanks for posting there as well!

Original comment by api.roman.public@gmail.com on 23 Jan 2009 at 10:49