Cesium not respecting StyleMap in KML files

I have KML files which use a gx:track for the track element, but also a number of elements that highlight different segments of the track in different colors (top speeds etc.)

The KML renders fine in Google Earth, but the styling for the linestrings is not respected by Cesium.

Here’s a sample of a 100m linestring. The element specifies a style called #100mstyle

#100mstyle100m26.668 2:41 AM UTC11clampToGroundgx:drawOrder98</gx:drawOrder>

153.2426479,-27.468194,0

153.2425403,-27.468277,0

153.2424395,-27.4683626,0

153.2422438,-27.4685363,0

153.2421404,-27.4686213,0

153.2420317,-27.4687026,0

Earlier on in the file, the #100mstyle is defined thus:

FFFFFF00 2 FFFFFF00 4

normal

100mstyle_n

highlight

100mstyle_h

What I’m expecting is that “normally” the normal style would be applied (100mstyle_n)

In a miracle scenario, Cesium might support hover and then when the mouse hovers over the relevant segment, the _h style is applied (which basically increases the width of the line.)

At the moment, all segments are rendered in white.

I don’t have a whole lot of control over the KML. I could change it for future renders, but the current library of 100,000+ files is already in the format mentioned above. Is there anything wrong with the KML? Or is it just unsupported? And if it is unsupported, can anyone poitn me to the right bit of code so I can try and add support?

Cheers,

Dylan.

Just realised I posted on this topic once before, and at the time the response was that this was a known issue and would be fixed in 1.11

We are now running 1.14 and it doesn’t seem to be fixed. Can anyone confirm?

Dylan

Link to issue: https://github.com/AnalyticalGraphicsInc/cesium/issues/2770

Hello Dylan,

Sorry, no one has had a chance to look at this yet. I’m not sure how soon it will be until it’s fixed.

Best,

Hannah

If someone could point me in the general direction of this bit of code I could take a look. It’s quite a high priority for my users.

Cheers,

Dylan.

That would be great! If you are able to fix it, we would love the contribution back.
Can you post a comment on the github issue? Tag @mramato in the comment and say you’re interested in taking a look at it. He’ll be able to give you the information you need.

-Hannah