Class: Kamelopard::Overlay

Inherits:
Feature show all
Includes:
Icon
Defined in:
lib/kamelopard/classes.rb

Overview

Abstract class corresponding to the KML Overlay object

Direct Known Subclasses

GroundOverlay, PhotoOverlay, ScreenOverlay

Instance Attribute Summary collapse

Attributes included from Icon

#h, #href, #httpQuery, #refreshInterval, #refreshMode, #viewBoundScale, #viewFormat, #viewRefreshMode, #viewRefreshTime, #w, #x, #y

Attributes inherited from Feature

#abstractView, #addressDetails, #atom_author, #atom_link, #description, #extendedData, #metadata, #name, #open, #phoneNumber, #region, #snippet, #styleSelector, #styleUrl, #styles, #timeprimitive, #visibility

Attributes included from Snippet

#maxLines, #snippet_text

Attributes inherited from Object

#comment, #kml_id, #master_only

Instance Method Summary collapse

Methods included from Icon

#icon_to_kml

Methods inherited from Feature

add_author, #extended_data_to_kml, #hide, #show, #styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=

Methods included from Snippet

#snippet_to_kml

Methods inherited from Object

#_alternate_to_kml, #change, #master_only?, parse

Constructor Details

#initialize(options = {}) ⇒ Overlay

Returns a new instance of Overlay.



2033
2034
2035
2036
# File 'lib/kamelopard/classes.rb', line 2033

def initialize(options = {})
    super nil, options
    DocumentHolder.instance.current_document.folder << self
end

Instance Attribute Details

#colorObject

Returns the value of attribute color.



2029
2030
2031
# File 'lib/kamelopard/classes.rb', line 2029

def color
  @color
end

#drawOrderObject

Returns the value of attribute drawOrder.



2029
2030
2031
# File 'lib/kamelopard/classes.rb', line 2029

def drawOrder
  @drawOrder
end

Instance Method Details

#to_kml(elem) ⇒ Object



2038
2039
2040
2041
2042
2043
2044
2045
2046
# File 'lib/kamelopard/classes.rb', line 2038

def to_kml(elem)
    super
    Kamelopard.kml_array(elem, [
        [ @color, 'color' ],
        [ @drawOrder, 'drawOrder' ],
    ])
    icon_to_kml(elem)
    elem
end