Class: Kamelopard::ScreenOverlay
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to KML’s ScreenOverlay object
Instance Attribute Summary collapse
-
#overlayXY ⇒ Object
Returns the value of attribute overlayXY.
-
#rotation ⇒ Object
Returns the value of attribute rotation.
-
#rotationXY ⇒ Object
Returns the value of attribute rotationXY.
-
#screenXY ⇒ Object
Returns the value of attribute screenXY.
-
#size ⇒ Object
Returns the value of attribute size.
Attributes inherited from Overlay
Attributes inherited from Feature
#abstractView, #addressDetails, #atom_author, #atom_link, #description, #extendedData, #metadata, #name, #open, #phoneNumber, #region, #snippet, #styleSelector, #styleUrl, #styles, #timeprimitive, #visibility
Attributes inherited from Object
Instance Method Summary collapse
-
#initialize(icon, name = nil, size = nil, rotation = nil, overlayXY = nil, screenXY = nil, rotationXY = nil) ⇒ ScreenOverlay
constructor
A new instance of ScreenOverlay.
- #to_kml(elem = nil) ⇒ Object
Methods inherited from Feature
add_author, #styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=
Constructor Details
#initialize(icon, name = nil, size = nil, rotation = nil, overlayXY = nil, screenXY = nil, rotationXY = nil) ⇒ ScreenOverlay
Returns a new instance of ScreenOverlay.
1416 1417 1418 1419 1420 1421 1422 1423 |
# File 'lib/kamelopard/classes.rb', line 1416 def initialize(icon, name = nil, size = nil, rotation = nil, = nil, screenXY = nil, rotationXY = nil) super(icon, name) @overlayXY = @screenXY = screenXY @rotationXY = rotationXY @size = size @rotation = rotation end |
Instance Attribute Details
#overlayXY ⇒ Object
Returns the value of attribute overlayXY.
1415 1416 1417 |
# File 'lib/kamelopard/classes.rb', line 1415 def @overlayXY end |
#rotation ⇒ Object
Returns the value of attribute rotation.
1415 1416 1417 |
# File 'lib/kamelopard/classes.rb', line 1415 def rotation @rotation end |
#rotationXY ⇒ Object
Returns the value of attribute rotationXY.
1415 1416 1417 |
# File 'lib/kamelopard/classes.rb', line 1415 def rotationXY @rotationXY end |
#screenXY ⇒ Object
Returns the value of attribute screenXY.
1415 1416 1417 |
# File 'lib/kamelopard/classes.rb', line 1415 def screenXY @screenXY end |
#size ⇒ Object
Returns the value of attribute size.
1415 1416 1417 |
# File 'lib/kamelopard/classes.rb', line 1415 def size @size end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 |
# File 'lib/kamelopard/classes.rb', line 1425 def to_kml(elem = nil) k = REXML::Element.new 'ScreenOverlay' super k @overlayXY.to_kml('overlayXY', k) unless @overlayXY.nil? @screenXY.to_kml('screenXY', k) unless @screenXY.nil? @rotationXY.to_kml('rotationXY', k) unless @rotationXY.nil? @size.to_kml('size', k) unless @size.nil? if ! @rotation.nil? then d = REXML::Element.new 'rotation' d.text = @rotation k << d end elem << k unless elem.nil? k end |