Class: KML::Overlay

Inherits:
Feature show all
Defined in:
lib/kml/overlay.rb

Overview

Overlay is the base type for image overlays drawn on the planet surface or on the screen. icon specifies the image to use and can be configured to reload images based on a timer or by camera changes. This element also includes specifications for stacking order of multiple overlays and for adding color and transparency values to the base image.

Direct Known Subclasses

GroundOverlay, ScreenOverlay

Instance Attribute Summary collapse

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

#colorObject

Returns the value of attribute color.



7
8
9
# File 'lib/kml/overlay.rb', line 7

def color
  @color
end

#draw_orderObject

Returns the value of attribute draw_order.



8
9
10
# File 'lib/kml/overlay.rb', line 8

def draw_order
  @draw_order
end

#iconObject

Returns the value of attribute icon.



9
10
11
# File 'lib/kml/overlay.rb', line 9

def icon
  @icon
end

Instance Method Details

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



11
12
13
14
15
16
# File 'lib/kml/overlay.rb', line 11

def render(xm=Builder::XmlMarkup.new(:indent => 2))
  super
  xm.color(color) unless color.nil?
  xm.drawOrder(drawOrder) unless draw_order.nil?
  icon.render(xm) unless icon.nil?
end