Open OxygenCobalt opened 6 months ago
I cannot find documentation about gx:CascadingStyle
From what I see it's basically like any other Style
element but presumably cascades some inherited style like CSS. I'm not too well-versed on KML though. All I want is for fastkml to recognize it as a Style and use it, the actual functionality isn't needed.
Here's a CascadingStyle
from our KML file:
<gx:CascadingStyle kml:id="__managed_style_881999257A2F4EDCAD33">
<styleUrl>https://earth.google.com/balloon_components/base/1.0.26.0/card_template.kml#main</styleUrl>
<Style>
<IconStyle>
<scale>1.2</scale>
<Icon>
<href>https://earth.google.com/earth/rpc/cc/icon?color=1976d2&id=2000&scale=4</href>
</Icon>
<hotSpot x="64" y="128" xunits="pixels" yunits="insetPixels"/>
</IconStyle>
<LabelStyle>
</LabelStyle>
<LineStyle>
<color>ff2846cc</color>
<width>3</width>
</LineStyle>
<PolyStyle>
<color>40ffffff</color>
</PolyStyle>
<BalloonStyle>
</BalloonStyle>
</Style>
</gx:CascadingStyle>
Hope this helps @cleder
The architecture has changed a lot from fastkml 0.x to 1.x.
One of the advantages of these changes is that you can define and add new behaviour at runtime through the registry.
What is still missing to be able to add arbitrary XML structures is that **kwargs
should be added to the base._XMLObject
and propagated through the inheritance chain. This way, the integration of things like gx:CascadingStyle
can be implemented by the end user without patching the underlying fastkml library.
Ping me if you are interested in helping to implement this.
Hello,
We've ran into an issue on our end where we cannot extract Polygon colors from the Google Earth KML files we exported on our end, as they are contained within a
gx:CascadingStyle
extension element that is not read. At minimum it would be useful for fastkml to read this element when it is referenced bystyleUrl
and then apply the relevant styles to the object being read.Thanks.