class Routes

Public Instance Methods

addRoutes(routeName, startDepotName, earliestStartTime, latestStartTime) click to toggle source
# File lib/arcgis_vrps/routes.rb, line 2
def addRoutes (routeName, startDepotName, earliestStartTime, latestStartTime)
        my_route = {
                        :attributes => {
                          :Name => routeName,
                          :StartDepotName => startDepotName, # Either this or EndDepotName must be present. This is a foreign key to the "Name" attribute in the depots param. Thus, the values MUST match
                          :EarliestStartTime  => earliestStartTime,
                          :LatestStartTime => latestStartTime
                        }
              }

        if @routeArr.nil?
                @routeArr = []
        end
        
        @routeArr.push(my_route)
end
getRouteArr() click to toggle source
@routeArr.push(my_route)

end

# File lib/arcgis_vrps/routes.rb, line 45
def getRouteArr
        return @routeArr
end
getRouteObj() click to toggle source
# File lib/arcgis_vrps/routes.rb, line 49
def getRouteObj
        routeObj = {
                :features => @routeArr
        }

        return routeObj
end