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

Instance Method Summary collapse

Methods included from Icon

#icon_to_kml

Methods inherited from Feature

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

Methods included from Snippet

#snippet_to_kml

Methods inherited from Object

#change

Constructor Details

#initialize(options = {}) ⇒ Overlay

Returns a new instance of Overlay.



1480
1481
1482
1483
# File 'lib/kamelopard/classes.rb', line 1480

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

Instance Attribute Details

#colorObject

Returns the value of attribute color.



1476
1477
1478
# File 'lib/kamelopard/classes.rb', line 1476

def color
  @color
end

#drawOrderObject

Returns the value of attribute drawOrder.



1476
1477
1478
# File 'lib/kamelopard/classes.rb', line 1476

def drawOrder
  @drawOrder
end

Instance Method Details

#to_kml(elem) ⇒ Object



1485
1486
1487
1488
1489
1490
1491
1492
1493
# File 'lib/kamelopard/classes.rb', line 1485

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