Class: 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 KMLObject
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(indent = 0) ⇒ Object
Methods inherited from Feature
#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.
1316 1317 1318 1319 1320 1321 1322 1323 |
# File 'lib/kamelopard/classes.rb', line 1316 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.
1315 1316 1317 |
# File 'lib/kamelopard/classes.rb', line 1315 def @overlayXY end |
#rotation ⇒ Object
Returns the value of attribute rotation.
1315 1316 1317 |
# File 'lib/kamelopard/classes.rb', line 1315 def rotation @rotation end |
#rotationXY ⇒ Object
Returns the value of attribute rotationXY.
1315 1316 1317 |
# File 'lib/kamelopard/classes.rb', line 1315 def rotationXY @rotationXY end |
#screenXY ⇒ Object
Returns the value of attribute screenXY.
1315 1316 1317 |
# File 'lib/kamelopard/classes.rb', line 1315 def screenXY @screenXY end |
#size ⇒ Object
Returns the value of attribute size.
1315 1316 1317 |
# File 'lib/kamelopard/classes.rb', line 1315 def size @size end |
Instance Method Details
#to_kml(indent = 0) ⇒ Object
1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 |
# File 'lib/kamelopard/classes.rb', line 1325 def to_kml(indent = 0) k = "#{ ' ' * indent }<ScreenOverlay id=\"#{ @id }\">\n" k << super(indent + 4) k << @overlayXY.to_kml('overlayXY', indent + 4) unless @overlayXY.nil? k << @screenXY.to_kml('screenXY', indent + 4) unless @screenXY.nil? k << @rotationXY.to_kml('rotationXY', indent + 4) unless @rotationXY.nil? k << @size.to_kml('size', indent + 4) unless @size.nil? k << "#{ ' ' * indent } <rotation>#{ @rotation }</rotation>\n" unless @rotation.nil? k << "#{ ' ' * indent }</ScreenOverlay>\n" end |