Class: Kamelopard::Style
- Inherits:
-
StyleSelector
- Object
- Object
- StyleSelector
- Kamelopard::Style
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to KML’s Style object. Attributes are expected to be IconStyle, LabelStyle, LineStyle, PolyStyle, BalloonStyle, and ListStyle objects.
Instance Attribute Summary collapse
-
#balloon ⇒ Object
Returns the value of attribute balloon.
-
#icon ⇒ Object
Returns the value of attribute icon.
-
#label ⇒ Object
Returns the value of attribute label.
-
#line ⇒ Object
Returns the value of attribute line.
-
#list ⇒ Object
Returns the value of attribute list.
-
#poly ⇒ Object
Returns the value of attribute poly.
Attributes inherited from Object
#comment, #kml_id, #master_only
Instance Method Summary collapse
Methods inherited from StyleSelector
#attach, #attached?, #initialize
Methods inherited from Object
#_alternate_to_kml, #change, #initialize, #master_only?
Constructor Details
This class inherits a constructor from Kamelopard::StyleSelector
Instance Attribute Details
#balloon ⇒ Object
Returns the value of attribute balloon.
1525 1526 1527 |
# File 'lib/kamelopard/classes.rb', line 1525 def balloon @balloon end |
#icon ⇒ Object
Returns the value of attribute icon.
1525 1526 1527 |
# File 'lib/kamelopard/classes.rb', line 1525 def icon @icon end |
#label ⇒ Object
Returns the value of attribute label.
1525 1526 1527 |
# File 'lib/kamelopard/classes.rb', line 1525 def label @label end |
#line ⇒ Object
Returns the value of attribute line.
1525 1526 1527 |
# File 'lib/kamelopard/classes.rb', line 1525 def line @line end |
#list ⇒ Object
Returns the value of attribute list.
1525 1526 1527 |
# File 'lib/kamelopard/classes.rb', line 1525 def list @list end |
#poly ⇒ Object
Returns the value of attribute poly.
1525 1526 1527 |
# File 'lib/kamelopard/classes.rb', line 1525 def poly @poly end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 |
# File 'lib/kamelopard/classes.rb', line 1527 def to_kml(elem = nil) k = XML::Node.new 'Style' super k @icon.to_kml(k) unless @icon.nil? @label.to_kml(k) unless @label.nil? @line.to_kml(k) unless @line.nil? @poly.to_kml(k) unless @poly.nil? @balloon.to_kml(k) unless @balloon.nil? @list.to_kml(k) unless @list.nil? elem << k unless elem.nil? k end |