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
Instance Method Summary collapse
-
#initialize(href = '', options = {}) ⇒ Link
constructor
A new instance of Link.
- #to_kml(elem = nil) ⇒ Object
Methods inherited from Object
Constructor Details
#initialize(href = '', options = {}) ⇒ Link
Returns a new instance of Link.
1861 1862 1863 1864 |
# File 'lib/kamelopard/classes.rb', line 1861 def initialize(href = '', = {}) super @href = href unless href == '' end |
Instance Attribute Details
#href ⇒ Object
Returns the value of attribute href.
1859 1860 1861 |
# File 'lib/kamelopard/classes.rb', line 1859 def href @href end |
#httpQuery ⇒ Object
Returns the value of attribute httpQuery.
1859 1860 1861 |
# File 'lib/kamelopard/classes.rb', line 1859 def httpQuery @httpQuery end |
#refreshInterval ⇒ Object
Returns the value of attribute refreshInterval.
1859 1860 1861 |
# File 'lib/kamelopard/classes.rb', line 1859 def refreshInterval @refreshInterval end |
#refreshMode ⇒ Object
Returns the value of attribute refreshMode.
1859 1860 1861 |
# File 'lib/kamelopard/classes.rb', line 1859 def refreshMode @refreshMode end |
#viewBoundScale ⇒ Object
Returns the value of attribute viewBoundScale.
1859 1860 1861 |
# File 'lib/kamelopard/classes.rb', line 1859 def viewBoundScale @viewBoundScale end |
#viewFormat ⇒ Object
Returns the value of attribute viewFormat.
1859 1860 1861 |
# File 'lib/kamelopard/classes.rb', line 1859 def viewFormat @viewFormat end |
#viewRefreshMode ⇒ Object
Returns the value of attribute viewRefreshMode.
1859 1860 1861 |
# File 'lib/kamelopard/classes.rb', line 1859 def viewRefreshMode @viewRefreshMode end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 |
# File 'lib/kamelopard/classes.rb', line 1866 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 |