Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

18 add screenoverlay support #393

Merged
merged 5 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add ScreenOverlay to __all__ to make it part of the module's public API.

Suggested change
__all__ = ["Document", "Folder"]
__all__ = ["Document", "Folder", "ScreenOverlay"]


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
Loading