Class: Kamelopard::ScreenOverlay

Inherits:
Overlay show all
Defined in:
lib/kamelopard/classes.rb

Overview

Corresponds to KML’s ScreenOverlay object

Instance Attribute Summary collapse

Attributes inherited from Overlay

#color, #drawOrder

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 inherited from Overlay

#initialize

Methods included from Icon

#icon_to_kml

Methods inherited from Feature

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

Methods included from Snippet

#snippet_to_kml

Methods inherited from Object

#_alternate_to_kml, #change, #initialize, #master_only?, parse

Constructor Details

This class inherits a constructor from Kamelopard::Overlay

Instance Attribute Details

#balloonVisibilityObject

Returns the value of attribute balloonVisibility.



2051
2052
2053
# File 'lib/kamelopard/classes.rb', line 2051

def balloonVisibility
  @balloonVisibility
end

#overlayXYObject

Returns the value of attribute overlayXY.



2051
2052
2053
# File 'lib/kamelopard/classes.rb', line 2051

def overlayXY
  @overlayXY
end

#rotationObject

Returns the value of attribute rotation.



2051
2052
2053
# File 'lib/kamelopard/classes.rb', line 2051

def rotation
  @rotation
end

#rotationXYObject

Returns the value of attribute rotationXY.



2051
2052
2053
# File 'lib/kamelopard/classes.rb', line 2051

def rotationXY
  @rotationXY
end

#screenXYObject

Returns the value of attribute screenXY.



2051
2052
2053
# File 'lib/kamelopard/classes.rb', line 2051

def screenXY
  @screenXY
end

#sizeObject

Returns the value of attribute size.



2051
2052
2053
# File 'lib/kamelopard/classes.rb', line 2051

def size
  @size
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object



2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
# File 'lib/kamelopard/classes.rb', line 2053

def to_kml(elem = nil)
    k = XML::Node.new 'ScreenOverlay'
    super k
    @overlayXY.to_kml('overlayXY', k)   unless @overlayXY.nil?
    @screenXY.to_kml('screenXY', k)     unless @screenXY.nil?
    @rotationXY.to_kml('rotationXY', k) unless @rotationXY.nil?
    @size.to_kml('size', k)             unless @size.nil?
    if ! @rotation.nil? then
        d = XML::Node.new 'rotation'
        d << @rotation.to_s
        k << d
    end
    if ! @balloonVisibility.nil? then
         x = XML::Node.new 'gx:balloonVisibility'
         x << ( @balloonVisibility ? 1 : 0 )
         k << x
    end
    elem << k unless elem.nil?
    k
end