Class: MapFlightExRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/FlightXML2REST.rb

Overview

MapFlightEx

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(airports_expand_view = nil, faFlightID = nil, latlon_box = [], layer_off = [], layer_on = [], mapHeight = nil, mapWidth = nil, show_airports = nil, show_data_blocks = nil) ⇒ MapFlightExRequest

Returns a new instance of MapFlightExRequest.



1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
# File 'lib/FlightXML2REST.rb', line 1796

def initialize(airports_expand_view = nil, 
               faFlightID = nil, 
               latlon_box = [], 
               layer_off = [], 
               layer_on = [], 
               mapHeight = nil, 
               mapWidth = nil, 
               show_airports = nil, 
               show_data_blocks = nil)
  @airports_expand_view = airports_expand_view
  @faFlightID = faFlightID
  @latlon_box = latlon_box
  @layer_off = layer_off
  @layer_on = layer_on
  @mapHeight = mapHeight
  @mapWidth = mapWidth
  @show_airports = show_airports
  @show_data_blocks = show_data_blocks
end

Instance Attribute Details

#airports_expand_viewObject

Returns the value of attribute airports_expand_view.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def airports_expand_view
  @airports_expand_view
end

#faFlightIDObject

Returns the value of attribute faFlightID.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def faFlightID
  @faFlightID
end

#latlon_boxObject

Returns the value of attribute latlon_box.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def latlon_box
  @latlon_box
end

#layer_offObject

Returns the value of attribute layer_off.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def layer_off
  @layer_off
end

#layer_onObject

Returns the value of attribute layer_on.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def layer_on
  @layer_on
end

#mapHeightObject

Returns the value of attribute mapHeight.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def mapHeight
  @mapHeight
end

#mapWidthObject

Returns the value of attribute mapWidth.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def mapWidth
  @mapWidth
end

#show_airportsObject

Returns the value of attribute show_airports.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def show_airports
  @show_airports
end

#show_data_blocksObject

Returns the value of attribute show_data_blocks.



1786
1787
1788
# File 'lib/FlightXML2REST.rb', line 1786

def show_data_blocks
  @show_data_blocks
end

Instance Method Details

#postObject



1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
# File 'lib/FlightXML2REST.rb', line 1815

def post
  #TODO Clean this up when the Rest-Client properly handles arrays
  latlon_box = ""
  @latlon_box.each { |v| latlon_box = latlon_box + "latlon_box=" + v.to_s + "&" }
  @latlon_box = latlon_box
  
  layer_on = ""
  @layer_on.each { |v| layer_on = layer_on + "layer_on=" + v.to_s + "&" }
  @layer_on = layer_on
  
  layer_off = ""
  @layer_off.each { |v| layer_off = layer_off + "layer_off=" + v.to_s + "&" }
  @layer_off = layer_off
  
  output = "airports_expand_view=#@airports_expand_view&faFlightID=#@faFlightID&#{@latlon_box}#{@layer_off}#{@layer_on}" +
  "mapHeight=#@mapHeight&mapWidth=#@mapWidth&show_airports=#@show_airports&show_data_blocks=#@show_data_blocks"
  output
end