<visibility> Issue

34 views
Skip to first unread message

pseabury

unread,
Sep 10, 2006, 11:44:53 AM9/10/06
to KML Discussions
It's possible that I've screwed up my kml somewhere, but looking at it a couple dozen times I can't see why all of the sudden a lot of the placemarks in my network link are acting like they have their visibility tag set to Code:
<visibility>0</visibility> 

. The link can be downloaded in the dynamic data layers forums, or here's the link .

When it loads, only part of the "Models" folder for each storm is visible, or checked, but the kml tells it that everything in that folder should be visible. Even if I explicity set the visibility to "1" (by default it's set to "1" or on if the tag is excluded), for all the children in that folder, I still get only partial visibility.

I can't decide if this is a bug I should report, or if I've done something boneheaded...in either case I'd appreciate it if someone could take a look. You can download the raw data here : tropModels.kmz

Thanks to anyone that can take the time to have a look.

Regards,

Paul

tekgergedan

unread,
Sep 10, 2006, 12:48:13 PM9/10/06
to KML Discussions
I am a bit sure that your kml has something confused with the ListSyle tags. With this line

<listItemType>radioFolder</listItemType>

they all and, therefore, their root folder cant be visible (ie checked).

pseabury

unread,
Sep 10, 2006, 1:04:54 PM9/10/06
to KML Discussions
Hmmm. Good catch and I will investigate this afternoon.

Although I disagree on one point... Only 1 item in the radio folder need be checked to satisy the requirement at the parent level that everything is checked.

So for my link I want the "Models" folder completely checked (in psuedocode): 0=notChecked 1=checked
Code:
 
-Current Storms
-storm1
-..etc.
-storm2
-Models (1)
-Initial (1)
-TrackHistory (1)
-BAMD (1)
-BAMM (1)
-LBAR (1)
-A98E (1)
-NHCDiscussions (radioFolder)
-disc#1 (0)
-disc#2 (0)
-disc#3 (0)
-None (1)
-Nearby Radars (radioFolder)
-Nearby Buoys


but what I end up with is (at least sometimes, I haven't changed anything and it's behaving slightly different now) :
Code:
   
-Current Storms
-storm1
-..etc.
-storm2
-Models (1)
-Initial (1)
-TrackHistory (1)
-BAMD (1)
-BAMM (0)
-LBAR (0)
-A98E (0)
-NHCDiscussions (radioFolder)
-disc#1 (0)
-disc#2 (0)
-disc#3 (0)
-None (0)
-Nearby Radars (radioFolder)
-Nearby Buoys


I'll take another look when I get back, but I keep getting strange behavior like the 2nd to last NHCDiscussion selected for some reason.

Regards,

Paul

pseabury

unread,
Sep 10, 2006, 1:13:26 PM9/10/06
to KML Discussions
You can see from the treeview below the behaviour I'm talking about. For some reason the 2nd to last Discussion is chosen, but not ALL of it.

Here's the code portion for that part of the tree:

Code:
 
<Folder>
<name>NHC Discussion 9/8/2006 11:00:00 PM</name>
<Snippet />
<visibility>0</visibility>
<Placemark>
<name>Discussion Track Line</name>
<visibility>0</visibility>
<Snippet />
<styleUrl>#NHC</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>-61.4,24.5,0 -63,25.5,0 -64.5,27,0 -65.3,28.7,0 -65.4,30.7,0
-63,35.5,0 -57.5,42.5,0 -48,48,0 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Initial Location</name>
<visibility>0</visibility>
<Snippet />
<description><!CDATA[<pre>WTNT41 KNHC 090301
...

$$</pre>]]></description>
<styleUrl>#NHC</styleUrl>
<Point>
<coordinates>-61.4,24.5,0 </coordinates>
</Point>
</Placemark>
<Placemark>
<name>12hrs</name>
<visibility>0</visibility>
<Snippet />
<description><!CDATA[<pre>NHC Discussion Forecast Point

9/9/2006 11:00:00 AM UTC
9/9/2006 7:00:00 AM EDT

Lat: 25.5 Lon: -63
SHIP: 65kts
DSHP: 65kts
</pre>]]></description>
<styleUrl>#NHC</styleUrl>
<Point>
<coordinates>-63,25.5,0 </coordinates>
</Point>
</Placemark>
<Placemark>
<name>24hrs</name>
<visibility>0</visibility>
<Snippet />
<description><!CDATA[<pre>NHC Discussion Forecast Point

9/9/2006 11:00:00 PM UTC
9/9/2006 7:00:00 PM EDT

Lat: 27 Lon: -64.5
SHIP: 75kts
DSHP: 75kts
</pre>]]></description>
<styleUrl>#NHC</styleUrl>
<Point>
<coordinates>-64.5,27,0 </coordinates>
</Point>
</Placemark>
<Placemark>
<name>36hrs</name>
<visibility>0</visibility>
<Snippet />
<description><!CDATA[<pre>NHC Discussion Forecast Point

9/10/2006 11:00:00 AM UTC
9/10/2006 7:00:00 AM EDT

Lat: 28.7 Lon: -65.3
SHIP: 85kts
DSHP: 85kts
</pre>]]></description>
<styleUrl>#NHC</styleUrl>
<Point>
<coordinates>-65.3,28.7,0 </coordinates>
</Point>
</Placemark>
<Placemark>
<name>48hrs</name>
<visibility>0</visibility>
<Snippet />
<description><!CDATA[<pre>NHC Discussion Forecast Point

9/10/2006 11:00:00 PM UTC
9/10/2006 7:00:00 PM EDT

Lat: 30.7 Lon: -65.4
SHIP: 90kts
DSHP: 90kts
</pre>]]></description>
<styleUrl>#NHC</styleUrl>
<Point>
<coordinates>-65.4,30.7,0 </coordinates>
</Point>
</Placemark>
<Placemark>
<name>72hrs</name>
<visibility>0</visibility>
<Snippet />
<description><!CDATA[<pre>NHC Discussion Forecast Point

9/11/2006 11:00:00 PM UTC
9/11/2006 7:00:00 PM EDT

Lat: 35.5 Lon: -63
SHIP: 85kts
DSHP: 85kts
</pre>]]></description>
<styleUrl>#NHC</styleUrl>
<Point>
<coordinates>-63,35.5,0 </coordinates>
</Point>
</Placemark>
<Placemark>
<name>96hrs</name>
<visibility>0</visibility>
<Snippet />
<description><!CDATA[<pre>NHC Discussion Forecast Point

9/12/2006 11:00:00 PM UTC
9/12/2006 7:00:00 PM EDT

Lat: 42.5 Lon: -57.5
SHIP: 75kts
DSHP: 75kts
</pre>]]></description>
<styleUrl>#NHC</styleUrl>
<Point>
<coordinates>-57.5,42.5,0 </coordinates>
</Point>
</Placemark>
<Placemark>
<name>120hrs</name>
<visibility>0</visibility>
<Snippet />
<description><!CDATA[<pre>NHC Discussion Forecast Point

9/13/2006 11:00:00 PM UTC
9/13/2006 7:00:00 PM EDT

Lat: 48 Lon: -48
SHIP: 65kts
DSHP: 65kts
</pre>]]></description>
<styleUrl>#NHC</styleUrl>
<Point>
<coordinates>-48,48,0 </coordinates>
</Point>
</Placemark>
</Folder>
<Folder>
<name>Discussions Off</name>
<open>0</open>
</Folder>
</Folder>



and here is the resulting checked items from that code:

tekgergedan

unread,
Sep 10, 2006, 1:14:54 PM9/10/06
to KML Discussions
Let me clarify to not get misunderstood. Your "Models" folders is all visible to me.

However, the other folders, with the tag mentioned, only one placemark will be visible. So, the main folders will be set to their third option of the checkmarks.

pseabury

unread,
Sep 10, 2006, 3:01:35 PM9/10/06
to KML Discussions
Yes, Like I mentioned before all of the sudden models started working properly again, but now the discussion folder is not appearing correctly. I understand how the radioFolder works...only 1 of its children can be checked at 1 time.

As you can see from my above post, the only child of NHCDiscussions that has visibility set to 1 (by default) is the "Discussions Off" folder.

Code:
 
<Folder>
<name>Discussions Off</name>
<open>0</open>
</Folder>



However, it is not visible and I get the behavior like the screenshot above. The radio item that should be checked is in fact unchecked, and the radio item that precedes it is partially checked. How the previous item got partially checked at all is a mystery to me...it's visibility is set to 0 for every child in that folder.

Paul

pseabury

unread,
Sep 10, 2006, 3:14:01 PM9/10/06
to KML Discussions
Ok, maybe by removing some of the unneccessary tags it can be more clear. Here is the section of kml with only the relevant parts remaining and the deleted parts represented by ellipses "...":

Code:
 
<Folder>
<name>NHC Discussions</name>
<Snippet />
<Style>
<ListStyle>
<listItemType>radioFolder</listItemType>
</ListStyle>
</Style>
<Folder>
<name>Most Recent NHC Discussion</name>

<Snippet />
<visibility>0</visibility>

            ...
</Folder>
<Folder>
<name>NHC Discussion 9/10/2006 5:00:00 AM</name>

<Snippet />
<visibility>0</visibility>

            ...
</Folder>
<Folder>
<name>NHC Discussion 9/9/2006 11:00:00 PM</name>

<Snippet />
<visibility>0</visibility>

            ...
</Folder>
<Folder>
<name>NHC Discussion 9/9/2006 5:00:00 PM</name>

<Snippet />
<visibility>0</visibility>

	    ...
</Folder>
<Folder>
<name>NHC Discussion 9/9/2006 11:00:00 AM</name>

<Snippet />
<visibility>0</visibility>

            ...
</Folder>
<Folder>
<name>NHC Discussion 9/9/2006 5:00:00 AM</name>

<Snippet />
<visibility>0</visibility>

            ...
</Folder>

<Folder>
<name>NHC Discussion 9/8/2006 11:00:00 PM</name>
<Snippet />
<visibility>0</visibility>

            ...
</Folder>

<Folder>
<name>Discussions Off</name>
<open>0</open>
</Folder>
        </Folder>



You can see that the only Folder that should be checked is the "Discussions Off" folder. But what actually happens...
Now again the resulting treeview in the GE Client:

mcshea98

unread,
Sep 10, 2006, 6:22:03 PM9/10/06
to KML Discussions
Paul,

This is just a guess (but I think it will work). Try putting an empty object into the "______ Off" Folder in each section. Like a placemark that has no icon, name or description (make sure that you set the "LookAt" range so it doesn't try and zoom in). I think that it (Google Earth) is trying to do what you are asking, but it doesn't know what to do when the default Folder is empty.

The other method is to go through and remove all <visibility>0</visibility> tags from your code. This will make it so that nothing inside the "radioFolder" is displayed. If nothing is set to <visibility>1</visibility>, then there is no radio button checked when you open the kml file.

Let me know which of these works better for you. I attached your file where I did the second option. I like this option, because it is cleaner.

Hope this helps,

mcshea98
590946-trop2.KML

pseabury

unread,
Sep 10, 2006, 10:21:58 PM9/10/06
to KML Discussions
Adding an empty placemark to the folder in question worked. Much appreciated.

Paul
Reply all
Reply to author
Forward
0 new messages