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.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def h
  @h
end

#hrefObject

Returns the value of attribute href.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def href
  @href
end

#httpQueryObject

Returns the value of attribute httpQuery.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def httpQuery
  @httpQuery
end

#refreshIntervalObject

Returns the value of attribute refreshInterval.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def refreshInterval
  @refreshInterval
end

#refreshModeObject

Returns the value of attribute refreshMode.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def refreshMode
  @refreshMode
end

#viewBoundScaleObject

Returns the value of attribute viewBoundScale.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def viewBoundScale
  @viewBoundScale
end

#viewFormatObject

Returns the value of attribute viewFormat.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def viewFormat
  @viewFormat
end

#viewRefreshModeObject

Returns the value of attribute viewRefreshMode.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def viewRefreshMode
  @viewRefreshMode
end

#viewRefreshTimeObject

Returns the value of attribute viewRefreshTime.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def viewRefreshTime
  @viewRefreshTime
end

#wObject

Returns the value of attribute w.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def w
  @w
end

#xObject

Returns the value of attribute x.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def x
  @x
end

#yObject

Returns the value of attribute y.



1267
1268
1269
# File 'lib/kamelopard/classes.rb', line 1267

def y
  @y
end

Instance Method Details

#icon_to_kml(elem = nil) ⇒ Object



1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
# File 'lib/kamelopard/classes.rb', line 1274

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