Class: Overlay
Overview
Abstract class corresponding to the KML Overlay object
Direct Known Subclasses
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#drawOrder ⇒ Object
Returns the value of attribute drawOrder.
-
#icon ⇒ Object
Returns the value of attribute icon.
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) ⇒ Overlay
constructor
A new instance of Overlay.
- #to_kml(indent = 0) ⇒ Object
Methods inherited from Feature
#styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=
Constructor Details
#initialize(icon, name = nil) ⇒ Overlay
Returns a new instance of Overlay.
1293 1294 1295 1296 1297 1298 1299 1300 1301 |
# File 'lib/kamelopard/classes.rb', line 1293 def initialize(icon, name = nil) super(name) if icon.respond_to?('to_kml') then @icon = icon elsif not icon.nil? @icon = Icon.new(icon.to_s) end Document.instance.folder << self end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
1291 1292 1293 |
# File 'lib/kamelopard/classes.rb', line 1291 def color @color end |
#drawOrder ⇒ Object
Returns the value of attribute drawOrder.
1291 1292 1293 |
# File 'lib/kamelopard/classes.rb', line 1291 def drawOrder @drawOrder end |
#icon ⇒ Object
Returns the value of attribute icon.
1291 1292 1293 |
# File 'lib/kamelopard/classes.rb', line 1291 def icon @icon end |
Instance Method Details
#to_kml(indent = 0) ⇒ Object
1303 1304 1305 1306 1307 1308 1309 1310 |
# File 'lib/kamelopard/classes.rb', line 1303 def to_kml(indent = 0) k = super(indent) + kml_array([ [ @color, 'color', true ], [ @drawOrder, 'drawOrder', true ], ], indent + 4) k << @icon.to_kml(indent) unless @icon.nil? k end |