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?
Constructor Details
#initialize(href = '', options = {}) ⇒ Link
Returns a new instance of Link.
2197 2198 2199 2200 |
# File 'lib/kamelopard/classes.rb', line 2197 def initialize(href = '', = {}) super @href = href unless href == '' end |
Instance Attribute Details
#href ⇒ Object
Returns the value of attribute href.
2195 2196 2197 |
# File 'lib/kamelopard/classes.rb', line 2195 def href @href end |
#httpQuery ⇒ Object
Returns the value of attribute httpQuery.
2195 2196 2197 |
# File 'lib/kamelopard/classes.rb', line 2195 def httpQuery @httpQuery end |
#refreshInterval ⇒ Object
Returns the value of attribute refreshInterval.
2195 2196 2197 |
# File 'lib/kamelopard/classes.rb', line 2195 def refreshInterval @refreshInterval end |
#refreshMode ⇒ Object
Returns the value of attribute refreshMode.
2195 2196 2197 |
# File 'lib/kamelopard/classes.rb', line 2195 def refreshMode @refreshMode end |
#viewBoundScale ⇒ Object
Returns the value of attribute viewBoundScale.
2195 2196 2197 |
# File 'lib/kamelopard/classes.rb', line 2195 def viewBoundScale @viewBoundScale end |
#viewFormat ⇒ Object
Returns the value of attribute viewFormat.
2195 2196 2197 |
# File 'lib/kamelopard/classes.rb', line 2195 def viewFormat @viewFormat end |
#viewRefreshMode ⇒ Object
Returns the value of attribute viewRefreshMode.
2195 2196 2197 |
# File 'lib/kamelopard/classes.rb', line 2195 def viewRefreshMode @viewRefreshMode end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 |
# File 'lib/kamelopard/classes.rb', line 2202 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 |