Class: KML::GroundOverlay

Inherits:
Overlay show all
Defined in:
lib/kml/ground_overlay.rb

Overview

This element draws an image overlay draped onto the terrain.

Instance Attribute Summary collapse

Attributes inherited from Overlay

#color, #draw_order, #icon

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?, #parse, #visibility, #visibility=, #visibility?

Methods inherited from Object

#initialize, #parse

Constructor Details

This class inherits a constructor from KML::Object

Instance Attribute Details

#altitudeObject

Returns the value of attribute altitude.



4
5
6
# File 'lib/kml/ground_overlay.rb', line 4

def altitude
  @altitude
end

#altitude_modeObject

Returns the value of attribute altitude_mode.



5
6
7
# File 'lib/kml/ground_overlay.rb', line 5

def altitude_mode
  @altitude_mode
end

#lat_lon_boxObject

Returns the value of attribute lat_lon_box.



6
7
8
# File 'lib/kml/ground_overlay.rb', line 6

def lat_lon_box
  @lat_lon_box
end

Instance Method Details

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

Raises:



8
9
10
11
12
13
14
15
16
# File 'lib/kml/ground_overlay.rb', line 8

def render(xm=Builder::XmlMarkup.new(:indent => 2))
  raise InvalidKMLError, "GroundOverlay.lat_lon_box is required" if lat_lon_box.nil?
  xm.GroundOverlay {
    super
    xm.altitude(altitude) unless altitude.nil?
    xm.altitudeMode(altitude_mode) unless altitude_mode.nil?
    lat_lon_box.render(xm)
  }
end