BalloonStyle for ExtendedData in gx:Track

873 views
Skip to first unread message

Mrbigmatt

unread,
Jun 8, 2011, 2:00:36 AM6/8/11
to kml-suppor...@googlegroups.com
I see that you can customize the balloon style of custom extended data:

And that you can add extended data to a gx:Track element:

But how do you customize the balloon style of when the user clicks on the track portion of the gx:Track element?
I have a custom balloon style for the placemark that that gx:Track element is in and that works for clicking on the placemark itself, but when I click on the track, the default table display (see first figure in first link) shows up (with the extended data I've entered). I've tried putting balloonstyles everywhere in the gx:Track hierarchy to no avail. Any ideas? Or is this not possible? Thanks in advance.

Brendan Kenny

unread,
Jun 14, 2011, 10:00:16 PM6/14/11
to KML Developer Support - Advanced Support for KML
Hi MrBigMatt,

This sounds like it may be a bug (or working as intended, but then a
very reasonable enhancement request). Do you have a link you can share
so that we can take a look?

Thanks,
Brendan

On Jun 7, 11:00 pm, Mrbigmatt wrote:
> I see that you can customize the balloon style of custom extended data:http://code.google.com/apis/kml/documentation/extendeddata.html
>
> And that you can add extended data to a gx:Track element:http://code.google.com/apis/kml/documentation/kmlreference.html#track...

Mrbigmatt

unread,
Jun 15, 2011, 12:01:35 AM6/15/11
to kml-suppor...@googlegroups.com
Brendan,

Here's what I'm working with:

If you click on one of the network links (I think the first is cached, so it should load faster) and wait a few minutes (it's a few megs worth), then uncheck the "Flight Plan Data" folder to speed it up a little, you should see lots of tracks with aircraft models on them. If you click on an aircraft, the balloon data that comes up is what I want the format of the track data to look like. However, when you click on an aircraft's track (the blue or red lines, depending on which network link you clicked on), you'll notice a table of the extended data comes up. I haven't been able to figure out where to put the styling to make this formatted the way I'd like.

As some other another semi-related side notes (but might be unrelated to kml), if you pull up the elevation profile of an aircraft, you'll notice that the number of extended data items runs off the side of the screen (unless you have a really high horizontal resolution), making them hard to select. Also the numbers on the graph sometimes get cut off because they're greater than 100 mph typically (they are aircraft, after all). Finally, is there any way to change the default elevation and speed items? I'd like to have them as altitude and airspeed with the latter being in knots instead of mph (or maybe there should be a way to optionally add units to the extended data?).

Sorry for the long response - I know these features weren't originally meant for air traffic visualization, but I think they are very useful. Let me know if you need a more concise example.

Thanks,
-Matt

Brendan Kenny

unread,
Jun 21, 2011, 8:57:49 PM6/21/11
to KML Developer Support - Advanced Support for KML
Hi Matt,

So this is indeed "working as expected," but the interpolated extended
data was designed so that stylable balloons along the track could be
added in the future, if the use cases came up. A few have come up
recently (in addition to yours), so I've made the case for this to be
added. If you want to add an issue to the tracker:

http://code.google.com/p/earth-issues/issues/entry

and link it here, people will be able to star it and get updates on
it.

For your other requests: you're right that the elevation profile view
wasn't designed with those kinds of numbers, but it does seem like a
reasonable enhancement request. If you could make a separate request
for that, I would appreciate it.

Thanks,
Brendan

Isidoro Russo

unread,
Apr 23, 2012, 2:36:44 PM4/23/12
to kml-suppor...@googlegroups.com
Hi MrBigMatt,
I know this post is quite old, however I've not been able to find any other relevant information on my issue:
basically, my problem is I am unable to show any extended data on the balloon of a placemark with gx:track in it. That is: what is wrong with my program is what you said was working with you!

I don't care for the balloon associated with the track, I just want to show my extended data on the balloon of the placemark.

I already knew and followed the links you posted, I used a balloonstyle for the placemark but entity replacement is not working.

I have this simple schema:

<Schema name="mySchema" id="mySchemaID">
<gx:SimpleArrayField type="float" name="WindSpd">
<displayName>Wind Speed (kt)</displayName>
</gx:SimpleArrayField>
</Schema> 

and this gx:track-enabled placemark:

<Placemark>
<name>My Placemark</name>
<styleUrl>#myStyle</styleUrl>
<gx:Track>
<altitudeMode>absolute</altitudeMode>
<when>2012-03-07T18:00:53+02:00</when>
...
<gx:coord>16.399 42.007999 -1</gx:coord>
...
<ExtendedData>
<SchemaData schemaUrl="#mySchema">
<gx:SimpleArrayData kml:name="WindSpd">
<gx:value>1.7</gx:value>
...
</gx:SimpleArrayData>
</SchemaData>
</ExtendedData>
</gx:track>
</Placemark> 

I then used this balloon style, myStyle:

<Style id="myStyle">
<IconStyle>
<scale>1.05</scale>
<Icon>
</Icon>
</IconStyle>
<LabelStyle>
<scale>0.9</scale>
</LabelStyle>
      <BalloonStyle>
 <text>
<![CDATA[
$[mySchema/WindSpd/displayName] = $[mySchema/WindSpd]
 ]]>
</text> 
      </BalloonStyle> 
</Style>

But, when I click on the placemark, I see a balloon with the string "$[mySchema/WindSpd/displayName] = $[mySchema/WindSpd]": that is: entities are not replaced.

A click on the track, instead, brings up a balloon with the default table, as you already pointed out.

Since your example website is not working anymore, could you please post your code with the working (styled) balloons for the placemark?

Thank you very much for your help,
Hope you had luck with your project!

Thanks,
bye,
Isidoro

Mrbigmatt

unread,
Apr 23, 2012, 7:35:16 PM4/23/12
to kml-suppor...@googlegroups.com
Since my examples aren't working at the moment, you can download a cached version of one of the scenarios here:


If you want to view the KML, just use any unzipping tool to unzip the file. Hope that helps!

Isidoro Russo

unread,
Apr 24, 2012, 3:30:35 PM4/24/12
to kml-suppor...@googlegroups.com
Thank you very much for your kind answer.
Sadly, It didn't help with my problem: the balloon you show on the
placemark (not the track) includes only static data and not the
gx:values in the array associated with the gx:track. I need a way to
show dynamic information(the data that's changing with time, the same
that's displayed when you click on the track) in the damn balloon but
I'm starting to believe this is not (yet?) possible.

Thank you very much anyway for sharing your valuable code with me. I
hope you'll find a solution (or workaround) to your problem anytime
soon!!!

Bye,
Ciao e grazie :)


Isidoro

On Wednesday, June 8, 2011 8:00:36 AM UTC+2, Mrbigmatt wrote:

Benjamin Waxler

unread,
Jul 5, 2013, 12:49:26 PM7/5/13
to kml-suppor...@googlegroups.com
I know its been a little while but was wondering if a work around has been found since it still doesn't appear to be supported. 
Reply all
Reply to author
Forward
0 new messages