Class: Kamelopard::LineString
- Includes:
- CoordinateList
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to the KML LineString object
Instance Attribute Summary collapse
-
#altitude ⇒ Object
Returns the value of attribute altitude.
-
#altitudeMode ⇒ Object
Returns the value of attribute altitudeMode.
-
#altitudeOffset ⇒ Object
Returns the value of attribute altitudeOffset.
-
#drawOrder ⇒ Object
Returns the value of attribute drawOrder.
-
#extrude ⇒ Object
Returns the value of attribute extrude.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#tessellate ⇒ Object
Returns the value of attribute tessellate.
Attributes included from CoordinateList
Attributes inherited from Object
#comment, #kml_id, #master_only
Instance Method Summary collapse
-
#initialize(coordinates = [], options = {}) ⇒ LineString
constructor
A new instance of LineString.
- #to_kml(elem = nil) ⇒ Object
Methods included from CoordinateList
#<<, #add_element, #coordinates_to_kml
Methods inherited from Object
#_alternate_to_kml, #change, #master_only?, parse
Constructor Details
#initialize(coordinates = [], options = {}) ⇒ LineString
Returns a new instance of LineString.
521 522 523 524 525 |
# File 'lib/kamelopard/classes.rb', line 521 def initialize(coordinates = [], = {}) @coordinates = [] super self.coordinates=(coordinates) unless coordinates.nil? end |
Instance Attribute Details
#altitude ⇒ Object
Returns the value of attribute altitude.
519 520 521 |
# File 'lib/kamelopard/classes.rb', line 519 def altitude @altitude end |
#altitudeMode ⇒ Object
Returns the value of attribute altitudeMode.
519 520 521 |
# File 'lib/kamelopard/classes.rb', line 519 def altitudeMode @altitudeMode end |
#altitudeOffset ⇒ Object
Returns the value of attribute altitudeOffset.
519 520 521 |
# File 'lib/kamelopard/classes.rb', line 519 def altitudeOffset @altitudeOffset end |
#drawOrder ⇒ Object
Returns the value of attribute drawOrder.
519 520 521 |
# File 'lib/kamelopard/classes.rb', line 519 def drawOrder @drawOrder end |
#extrude ⇒ Object
Returns the value of attribute extrude.
519 520 521 |
# File 'lib/kamelopard/classes.rb', line 519 def extrude @extrude end |
#latitude ⇒ Object
Returns the value of attribute latitude.
519 520 521 |
# File 'lib/kamelopard/classes.rb', line 519 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
519 520 521 |
# File 'lib/kamelopard/classes.rb', line 519 def longitude @longitude end |
#tessellate ⇒ Object
Returns the value of attribute tessellate.
519 520 521 |
# File 'lib/kamelopard/classes.rb', line 519 def tessellate @tessellate end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/kamelopard/classes.rb', line 527 def to_kml(elem = nil) k = XML::Node.new 'LineString' super(k) Kamelopard.kml_array(k, [ [@altitudeOffset, 'gx:altitudeOffset'], [@extrude, 'extrude'], [@tessellate, 'tessellate'], [@drawOrder, 'gx:drawOrder'] ]) coordinates_to_kml(k) unless @coordinates.nil? Kamelopard.add_altitudeMode @altitudeMode, k elem << k unless elem.nil? k end |