Class: Kamelopard::NetworkLink
- Defined in:
- lib/kamelopard/classes.rb
Overview
Analogue of KML’s NetworkLink class
Instance Attribute Summary collapse
-
#flyToView ⇒ Object
Returns the value of attribute flyToView.
-
#link ⇒ Object
Returns the value of attribute link.
-
#refreshVisibility ⇒ Object
Returns the value of attribute refreshVisibility.
Attributes inherited from Feature
#abstractView, #addressDetails, #atom_author, #atom_link, #description, #extendedData, #metadata, #name, #open, #phoneNumber, #region, #snippet, #styleSelector, #styleUrl, #styles, #timeprimitive, #visibility
Attributes included from Snippet
Attributes inherited from Object
#comment, #kml_id, #master_only
Instance Method Summary collapse
- #href ⇒ Object
- #href=(a) ⇒ Object
-
#initialize(href = '', options = {}) ⇒ NetworkLink
constructor
A new instance of NetworkLink.
- #refreshMode ⇒ Object
- #refreshMode=(a) ⇒ Object
- #to_kml(elem = nil) ⇒ Object
- #viewRefreshMode ⇒ Object
- #viewRefreshMode=(a) ⇒ Object
Methods inherited from Feature
add_author, #extended_data_to_kml, #hide, #show, #styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=
Methods included from Snippet
Methods inherited from Object
#_alternate_to_kml, #change, #master_only?, parse
Constructor Details
#initialize(href = '', options = {}) ⇒ NetworkLink
Returns a new instance of NetworkLink.
2386 2387 2388 2389 2390 2391 2392 2393 |
# File 'lib/kamelopard/classes.rb', line 2386 def initialize(href = '', = {}) super(( [:name] || ''), ) @refreshMode ||= :onChange @viewRefreshMode ||= :never @link = Link.new(href, :refreshMode => @refreshMode, :viewRefreshMode => @viewRefreshMode) @refreshVisibility ||= 0 @flyToView ||= 0 end |
Instance Attribute Details
#flyToView ⇒ Object
Returns the value of attribute flyToView.
2384 2385 2386 |
# File 'lib/kamelopard/classes.rb', line 2384 def flyToView @flyToView end |
#link ⇒ Object
Returns the value of attribute link.
2384 2385 2386 |
# File 'lib/kamelopard/classes.rb', line 2384 def link @link end |
#refreshVisibility ⇒ Object
Returns the value of attribute refreshVisibility.
2384 2385 2386 |
# File 'lib/kamelopard/classes.rb', line 2384 def refreshVisibility @refreshVisibility end |
Instance Method Details
#href ⇒ Object
2403 2404 2405 |
# File 'lib/kamelopard/classes.rb', line 2403 def href link.href end |
#href=(a) ⇒ Object
2415 2416 2417 |
# File 'lib/kamelopard/classes.rb', line 2415 def href=(a) link.href = a end |
#refreshMode ⇒ Object
2395 2396 2397 |
# File 'lib/kamelopard/classes.rb', line 2395 def refreshMode link.refreshMode end |
#refreshMode=(a) ⇒ Object
2407 2408 2409 |
# File 'lib/kamelopard/classes.rb', line 2407 def refreshMode=(a) link.refreshMode = a end |
#to_kml(elem = nil) ⇒ Object
2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 |
# File 'lib/kamelopard/classes.rb', line 2419 def to_kml(elem = nil) e = XML::Node.new 'NetworkLink' super e @link.to_kml e Kamelopard.kml_array(e, [ [@flyToView, 'flyToView'], [@refreshVisibility, 'refreshVisibility'] ]) elem << e unless elem.nil? e end |
#viewRefreshMode ⇒ Object
2399 2400 2401 |
# File 'lib/kamelopard/classes.rb', line 2399 def viewRefreshMode link.viewRefreshMode end |
#viewRefreshMode=(a) ⇒ Object
2411 2412 2413 |
# File 'lib/kamelopard/classes.rb', line 2411 def viewRefreshMode=(a) link.viewRefreshMode = a end |