Class: Kamelopard::Link
Overview
Corresponds to KML’s Link object
Instance Attribute Summary collapse
-
#href ⇒ Object
Returns the value of attribute href.
-
#httpQuery ⇒ Object
Returns the value of attribute httpQuery.
-
#refreshInterval ⇒ Object
Returns the value of attribute refreshInterval.
-
#refreshMode ⇒ Object
Returns the value of attribute refreshMode.
-
#viewBoundScale ⇒ Object
Returns the value of attribute viewBoundScale.
-
#viewFormat ⇒ Object
Returns the value of attribute viewFormat.
-
#viewRefreshMode ⇒ Object
Returns the value of attribute viewRefreshMode.
Attributes inherited from Object
#comment, #kml_id, #master_only
Instance Method Summary collapse
-
#initialize(href = '', options = {}) ⇒ Link
constructor
A new instance of Link.
- #to_kml(elem = nil) ⇒ Object
Methods inherited from Object
#_alternate_to_kml, #change, #master_only?, parse
Constructor Details
#initialize(href = '', options = {}) ⇒ Link
Returns a new instance of Link.
2248 2249 2250 2251 |
# File 'lib/kamelopard/classes.rb', line 2248 def initialize(href = '', = {}) super @href = href unless href == '' end |
Instance Attribute Details
#href ⇒ Object
Returns the value of attribute href.
2246 2247 2248 |
# File 'lib/kamelopard/classes.rb', line 2246 def href @href end |
#httpQuery ⇒ Object
Returns the value of attribute httpQuery.
2246 2247 2248 |
# File 'lib/kamelopard/classes.rb', line 2246 def httpQuery @httpQuery end |
#refreshInterval ⇒ Object
Returns the value of attribute refreshInterval.
2246 2247 2248 |
# File 'lib/kamelopard/classes.rb', line 2246 def refreshInterval @refreshInterval end |
#refreshMode ⇒ Object
Returns the value of attribute refreshMode.
2246 2247 2248 |
# File 'lib/kamelopard/classes.rb', line 2246 def refreshMode @refreshMode end |
#viewBoundScale ⇒ Object
Returns the value of attribute viewBoundScale.
2246 2247 2248 |
# File 'lib/kamelopard/classes.rb', line 2246 def viewBoundScale @viewBoundScale end |
#viewFormat ⇒ Object
Returns the value of attribute viewFormat.
2246 2247 2248 |
# File 'lib/kamelopard/classes.rb', line 2246 def viewFormat @viewFormat end |
#viewRefreshMode ⇒ Object
Returns the value of attribute viewRefreshMode.
2246 2247 2248 |
# File 'lib/kamelopard/classes.rb', line 2246 def viewRefreshMode @viewRefreshMode end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 |
# File 'lib/kamelopard/classes.rb', line 2253 def to_kml(elem = nil) x = XML::Node.new 'Link' super x { :href => @href, :refreshMode => @refreshMode, :viewRefreshMode => @viewRefreshMode, }.each do |k, v| d = XML::Node.new k.to_s d << v.to_s x << d end Kamelopard.kml_array(x, [ [ @refreshInterval, 'refreshInterval' ], [ @viewBoundScale, 'viewBoundScale' ], [ @viewFormat, 'viewFormat' ], [ @httpQuery, 'httpQuery' ] ]) elem << x unless elem.nil? x end |