Skip to content

Commit

Permalink
Merge pull request #393 from cleder/18-add-screenoverlay-support
Browse files Browse the repository at this point in the history
18 add screenoverlay support
  • Loading branch information
cleder authored Nov 24, 2024
2 parents a6b5087 + d836ecf commit 1c8eb10
Show file tree
Hide file tree
Showing 7 changed files with 573 additions and 7 deletions.
2 changes: 2 additions & 0 deletions docs/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog
1.0.0dev0 (unreleased)
----------------------

- Add support for ScreenOverlay


1.0 (2024/11/19)
-----------------
Expand Down
2 changes: 2 additions & 0 deletions fastkml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
from fastkml.links import Link
from fastkml.overlays import GroundOverlay
from fastkml.overlays import PhotoOverlay
from fastkml.overlays import ScreenOverlay
from fastkml.styles import BalloonStyle
from fastkml.styles import IconStyle
from fastkml.styles import LabelStyle
Expand All @@ -72,6 +73,7 @@
"PhotoOverlay",
"Schema",
"SchemaData",
"ScreenOverlay",
"StyleUrl",
"Style",
"StyleMap",
Expand Down
18 changes: 16 additions & 2 deletions fastkml/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
from fastkml.helpers import xml_subelement_list_kwarg
from fastkml.overlays import GroundOverlay
from fastkml.overlays import PhotoOverlay
from fastkml.overlays import ScreenOverlay
from fastkml.registry import RegistryItem
from fastkml.registry import registry
from fastkml.styles import Style
Expand All @@ -55,6 +56,8 @@

logger = logging.getLogger(__name__)

__all__ = ["Document", "Folder"]

KmlGeometry = Union[
Point,
LineString,
Expand Down Expand Up @@ -328,8 +331,19 @@ def get_style_by_url(self, style_url: str) -> Optional[Union[Style, StyleMap]]:
RegistryItem(
ns_ids=("kml",),
attr_name="features",
node_name="Folder,Placemark,Document,GroundOverlay,PhotoOverlay,NetworkLink",
classes=(Document, Folder, Placemark, GroundOverlay, PhotoOverlay, NetworkLink),
node_name=(
"Folder,Placemark,Document,GroundOverlay,PhotoOverlay,ScreenOverlay,"
"NetworkLink"
),
classes=(
Document,
Folder,
Placemark,
GroundOverlay,
PhotoOverlay,
ScreenOverlay,
NetworkLink,
),
get_kwarg=xml_subelement_list_kwarg,
set_element=xml_subelement_list,
),
Expand Down
Loading

0 comments on commit 1c8eb10

Please sign in to comment.