Class: Icon

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

Overview

Corresponds to the KML Icon object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(href = nil) ⇒ Icon

Returns a new instance of Icon.



849
850
851
# File 'lib/kamelopard/classes.rb', line 849

def initialize(href = nil)
    @href = href
end

Instance Attribute Details

#hObject

Returns the value of attribute h.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def h
  @h
end

#hrefObject

Returns the value of attribute href.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def href
  @href
end

#httpQueryObject

Returns the value of attribute httpQuery.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def httpQuery
  @httpQuery
end

#refreshIntervalObject

Returns the value of attribute refreshInterval.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def refreshInterval
  @refreshInterval
end

#refreshModeObject

Returns the value of attribute refreshMode.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def refreshMode
  @refreshMode
end

#viewBoundScaleObject

Returns the value of attribute viewBoundScale.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def viewBoundScale
  @viewBoundScale
end

#viewFormatObject

Returns the value of attribute viewFormat.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def viewFormat
  @viewFormat
end

#viewRefreshModeObject

Returns the value of attribute viewRefreshMode.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def viewRefreshMode
  @viewRefreshMode
end

#viewRefreshTimeObject

Returns the value of attribute viewRefreshTime.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def viewRefreshTime
  @viewRefreshTime
end

#wObject

Returns the value of attribute w.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def w
  @w
end

#xObject

Returns the value of attribute x.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def x
  @x
end

#yObject

Returns the value of attribute y.



847
848
849
# File 'lib/kamelopard/classes.rb', line 847

def y
  @y
end

Instance Method Details

#to_kml(indent = 0) ⇒ Object



853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
# File 'lib/kamelopard/classes.rb', line 853

def to_kml(indent = 0)
    k = "#{ ' ' * indent }<Icon>\n"
    k << kml_array([
        [@href, 'href', true],
        [@x, 'gx:x', true],
        [@y, 'gx:y', true],
        [@w, 'gx:w', true],
        [@h, 'gx:h', true],
        [@refreshMode, 'refreshMode', true],
        [@refreshInterval, 'refreshInterval', true],
        [@viewRefreshMode, 'viewRefreshMode', true],
        [@viewBoundScale, 'viewBoundScale', true],
        [@viewFormat, 'viewFormat', true],
        [@httpQuery, 'httpQuery', true],
    ], indent + 4)
    k << "#{ ' ' * indent }</Icon>\n"
end