CesiumGS / CesiumGS/cesium

[KML Support]: `gx:CascadingStyle` support

Open
#9,902 1 comment 0 reactions 0 assignees View on GitHub
category - kml type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

When I import a kml file into Cesium that I created with Google Earth, it doesn't display shapes correctly. I would expect the line colors, fill colors, and transparencies to display very closely to what I see on Google Earth. Instead, what I get is a shape with no colors or transparencies. Just a plain white shape. If I create the same kml file with Google Earth Enterprise and load it into Cesium, it displays correctly.

I've traced down the issue to what I believe is a `gx:CascadingStyle>` that is causing the problem. This may not be the whole issue, but if I take the line:
```


```
take the id and move it to the `<Style>` tag and then remove the `<gx:CascadingStyle ` tag, so now it looks like:
```
<Style id="__managed_style_2E63942E081DFE53558D">
```
Now everything works correctly.

My guess is Cesium doesn't parse the `<gx:CascadingStyle>` correctly or maybe it's a matter of not having the style id on the `<Style>` tag. I'm not sure.

Sandcastle example:
[Non-working Sandcastle](https://tinyurl.com/zdb3s58v)
[Working Sandcastle](https://tinyurl.com/22hbr2c)

Browser:
Chrome

Operating System:
Windows 10

Contributor guide

Open the contributing guide

Research direction

Start with the non-working and working Sandcastle examples linked in the issue, comparing their KML input and rendered results. Trace how the Cesium KML importer handles gx:CascadingStyle and Style IDs, then verify that line colors, fill colors, and transparencies render like the working example and Google Earth.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.