class Orders
Public Instance Methods
addOrders(xCoordinate, yCoordinate, orderAttributeObj)
click to toggle source
Longitude => xCoordinate, Latitude => yCoordinate
# File lib/arcgis_vrps/orders.rb, line 3 def addOrders (xCoordinate, yCoordinate, orderAttributeObj) my_order = { :geometry => { :x => xCoordinate, :y => yCoordinate }, :attributes => orderAttributeObj } if @orderArr.nil? @orderArr = [] end @orderArr.push(my_order) end
getBasicOrderAttributeObj(orderName)
click to toggle source
Get basic Orders
Attribute Object from the param passed in
# File lib/arcgis_vrps/orders.rb, line 23 def getBasicOrderAttributeObj (orderName) orderAttributeObj = { :Name => orderName } return orderAttributeObj end
getOrderArr()
click to toggle source
# File lib/arcgis_vrps/orders.rb, line 18 def getOrderArr return @orderArr end
getOrderAttributeObj(orderName, serviceTime)
click to toggle source
Get orders attribute object from the param passed in timeWindow* refers to the time that the service serviceTime specify how much time to be spent there. value is as per time_units def getOrderAttributeObj (orderName, serviceTime, timeWindowStart1, timeWindowEnd1, maxViolationTime1)
# File lib/arcgis_vrps/orders.rb, line 35 def getOrderAttributeObj (orderName, serviceTime) # if maxViolationTime1.nil? # orderAttributeObj = { # :Name => orderName, # :ServiceTime => serviceTime, # :TimeWindowStart1 => timeWindowStart1, # :TimeWindowEnd1 => timeWindowEnd1 # } # else # orderAttributeObj = { # :Name => orderName, # :ServiceTime => serviceTime, # :TimeWindowStart1 => timeWindowStart1, # :TimeWindowEnd1 => timeWindowEnd1, # :MaxViolationTime1 => maxViolationTime1 # } # end orderAttributeObj = { :Name => orderName, :ServiceTime => serviceTime } return orderAttributeObj end
getOrderObj(wkid)
click to toggle source
return orderAttributeObj
end
# File lib/arcgis_vrps/orders.rb, line 75 def getOrderObj (wkid) if wkid.nil? orderObj = { :features => @orderArr } else orderObj = { :spatialReference => { :wkid => wkid }, :features => @orderArr } end return orderObj end