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.



1991
1992
1993
# File 'lib/kamelopard/classes.rb', line 1991

def balloonVisibility
  @balloonVisibility
end

#overlayXYObject

Returns the value of attribute overlayXY.



1991
1992
1993
# File 'lib/kamelopard/classes.rb', line 1991

def overlayXY
  @overlayXY
end

#rotationObject

Returns the value of attribute rotation.



1991
1992
1993
# File 'lib/kamelopard/classes.rb', line 1991

def rotation
  @rotation
end

#rotationXYObject

Returns the value of attribute rotationXY.



1991
1992
1993
# File 'lib/kamelopard/classes.rb', line 1991

def rotationXY
  @rotationXY
end

#screenXYObject

Returns the value of attribute screenXY.



1991
1992
1993
# File 'lib/kamelopard/classes.rb', line 1991

def screenXY
  @screenXY
end

#sizeObject

Returns the value of attribute size.



1991
1992
1993
# File 'lib/kamelopard/classes.rb', line 1991

def size
  @size
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object



1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
# File 'lib/kamelopard/classes.rb', line 1993

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