Class: KML::Placemark

Inherits:
Container show all
Defined in:
lib/kml/placemark.rb

Instance Attribute Summary collapse

Attributes inherited from Container

#features, #plain_children

Attributes inherited from Feature

#address, #address_details, #description, #look_at, #metadata, #name, #phone_number, #region, #snippet, #style_selector, #style_url, #time_primitive

Attributes inherited from Object

#id

Instance Method Summary collapse

Methods inherited from Feature

#open, #open=, #open?, #visibility, #visibility=, #visibility?

Methods inherited from Object

#initialize

Constructor Details

This class inherits a constructor from KML::Object

Instance Attribute Details

#geometryObject

Returns the value of attribute geometry.



27
28
29
# File 'lib/kml/placemark.rb', line 27

def geometry
  @geometry
end

Instance Method Details

#render(xm = Builder::XmlMarkup.new(:indent => 2)) ⇒ Object



29
30
31
32
33
34
35
36
# File 'lib/kml/placemark.rb', line 29

def render(xm=Builder::XmlMarkup.new(:indent => 2))
  xm.Placemark {
    super
    features.each { |f| f.render(xm) }
    plain_children.each { |c| xm << c }
    geometry.render(xm) unless geometry.nil?
  }
end