Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fastkml
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurélien Vermylen
fastkml
Commits
b7bad6b2
Commit
b7bad6b2
authored
Aug 28, 2014
by
Ian Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added base class for Overlay
parent
111e30dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
6 deletions
+75
-6
fastkml/kml.py
fastkml/kml.py
+75
-6
No files found.
fastkml/kml.py
View file @
b7bad6b2
...
...
@@ -168,12 +168,11 @@ class _Feature(_BaseObject):
"""
abstract element; do not create
subclasses are:
Container (Document, Folder),
Placemark,
#NetworkLink,
#GroundOverlay,
#PhotoOverlay,
#ScreenOverlay
* Container (Document, Folder)
* Placemark
* Overlay
Not Implemented Yet:
* NetworkLink
"""
name
=
None
# User-defined text displayed in the 3D viewer as the label for the
...
...
@@ -645,6 +644,76 @@ class _Container(_Feature):
assert
(
kmlobj
!=
self
)
class
_Overlay
(
_Feature
):
"""
abstract element; do not create
Base type for image overlays drawn on the planet surface or on the screen
A Container element holds one or more Features and allows the
creation of nested hierarchies.
subclasses are:
* GroundOverlay
* PhotoOverlay
* ScreenOverlay
"""
_color
=
None
# Color values expressed in hexadecimal notation, including opacity (alpha)
# values. The order of expression is alpha, blue, green, red (AABBGGRR).
# The range of values for any one color is 0 to 255 (00 to ff). For
# opacity, 00 is fully transparent and ff is fully opaque.
_drawOrder
=
None
# Defines the stacking order for the images in overlapping overlays.
# Overlays with higher <drawOrder> values are drawn on top of those with
# lower <drawOrder> values.
_icon
=
None
# Defines the image associated with the overlay. Contains an <href> html
# tag which defines the location of the image to be used as the overlay.
# The location can be either on a local file system or on a webserver. If
# this element is omitted or contains no <href>, a rectangle is drawn using
# the color and size defined by the ground or screen overlay.
def
__init__
(
self
,
ns
=
None
,
id
=
None
,
name
=
None
,
description
=
None
,
styles
=
None
,
styleUrl
=
None
):
super
(
_Overlay
,
self
).
__init__
(
ns
,
id
,
name
,
description
,
styles
,
styleUrl
)
@
property
def
color
(
self
):
return
self
.
_color
@
color
.
setter
def
color
(
self
,
color
):
self
.
_color
=
color
@
property
def
drawOrder
(
self
):
return
self
.
_drawOrder
@
drawOrder
.
setter
def
drawOrder
(
self
,
value
):
try
:
int
(
value
)
except
(
ValueError
,
TypeError
):
self
.
_drawOrder
=
None
else
:
self
.
_drawOrder
=
value
@
property
def
icon
(
self
):
return
self
.
_icon
@
icon
.
setter
def
icon
(
self
,
url
):
self
.
_icon
=
url
class
Document
(
_Container
):
"""
A Document is a container for features and styles. This element is
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment