Class: Kamelopard::Region

Inherits:
Object
  • Object
show all
Defined in:
lib/kamelopard/classes.rb

Overview

Corresponds to the KML Region object

Instance Attribute Summary collapse

Attributes inherited from Object

#comment, #kml_id, #master_only

Instance Method Summary collapse

Methods inherited from Object

#_alternate_to_kml, #change, #master_only?, parse

Constructor Details

#initialize(options = {}) ⇒ Region

Returns a new instance of Region.



2237
2238
2239
# File 'lib/kamelopard/classes.rb', line 2237

def initialize(options = {})
    super
end

Instance Attribute Details

#latlonaltboxObject

Returns the value of attribute latlonaltbox.



2235
2236
2237
# File 'lib/kamelopard/classes.rb', line 2235

def latlonaltbox
  @latlonaltbox
end

#lodObject

Returns the value of attribute lod.



2235
2236
2237
# File 'lib/kamelopard/classes.rb', line 2235

def lod
  @lod
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object



2241
2242
2243
2244
2245
2246
2247
2248
# File 'lib/kamelopard/classes.rb', line 2241

def to_kml(elem = nil)
    k = XML::Node.new 'Region'
    super k
    @latlonaltbox.to_kml(k, true) unless @latlonaltbox.nil?
    @lod.to_kml(k) unless @lod.nil?
    elem << k unless elem.nil?
    k
end