Module: Kamelopard::Icon

Included in:
IconStyle, Overlay
Defined in:
lib/kamelopard/classes.rb

Overview

Corresponds to the KML Icon object

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hObject

Returns the value of attribute h.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def h
  @h
end

#hrefObject

Returns the value of attribute href.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def href
  @href
end

#httpQueryObject

Returns the value of attribute httpQuery.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def httpQuery
  @httpQuery
end

#refreshIntervalObject

Returns the value of attribute refreshInterval.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def refreshInterval
  @refreshInterval
end

#refreshModeObject

Returns the value of attribute refreshMode.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def refreshMode
  @refreshMode
end

#viewBoundScaleObject

Returns the value of attribute viewBoundScale.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def viewBoundScale
  @viewBoundScale
end

#viewFormatObject

Returns the value of attribute viewFormat.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def viewFormat
  @viewFormat
end

#viewRefreshModeObject

Returns the value of attribute viewRefreshMode.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def viewRefreshMode
  @viewRefreshMode
end

#viewRefreshTimeObject

Returns the value of attribute viewRefreshTime.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def viewRefreshTime
  @viewRefreshTime
end

#wObject

Returns the value of attribute w.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def w
  @w
end

#xObject

Returns the value of attribute x.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def x
  @x
end

#yObject

Returns the value of attribute y.



1470
1471
1472
# File 'lib/kamelopard/classes.rb', line 1470

def y
  @y
end

Instance Method Details

#icon_to_kml(elem = nil) ⇒ Object



1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
# File 'lib/kamelopard/classes.rb', line 1477

def icon_to_kml(elem = nil)
    @icon_id = "#{Kamelopard.id_prefix}Icon_#{Kamelopard.get_next_id}" if @icon_id.nil?
    k = XML::Node.new 'Icon'
    k.attributes['id'] = @icon_id
    Kamelopard.kml_array(k, [
        [@href, 'href'],
        [@x, 'gx:x'],
        [@y, 'gx:y'],
        [@w, 'gx:w'],
        [@h, 'gx:h'],
        [@refreshMode, 'refreshMode'],
        [@refreshInterval, 'refreshInterval'],
        [@viewRefreshMode, 'viewRefreshMode'],
        [@viewRefreshTime, 'viewRefreshTime'],
        [@viewBoundScale, 'viewBoundScale'],
        [@viewFormat, 'viewFormat'],
        [@httpQuery, 'httpQuery'],
    ])
    elem << k unless elem.nil?
    k
end