new alk.service.MultipleServiceRequestEngine(opt_options)
This constructor creates an object that has the function of making multiple asychronous requests and singling back when all are done. This functionality is useful for getting information for Weather Alerts, etc.
| Option | Type | Description |
|---|---|---|
service |
alk.service.Service |
This option contains the service with which to make requests. |
Methods
-
processQueue(complete)
-
This method makes requests queued up since the last call to this method.
When each response is received, its associated future is called.
Name Type Description completefunction Function is called to notify when all codes have been loaded.
-
queueRequest(options, future)
-
This method queues the future to be executed when a response for the requestId is returned.
Name Type Description optionsalkx.ServiceOptions The options of the request to be given to the service.
Option Type Description afSetIdsArray.<(string|number)> | string This option lists the avoid/favor sets to the route.
apiKeystring This option contains the ALK ApiKey that gives you permission to extract data from ALK Servers.
avoidFavorsboolean | number | string This option tells the service whether or not to use avoids and favors while routing.
avoidTollsboolean | number | string This option tells the service to avoid toll roads and bridges while creating the route.
axlesnumber | string This option contains the number of axles on the vehicle.
boundingBoxArray.<number> | string This option holds the bounding box, or extent in which the items are requested.
centerArray.<number> | string This option contains the center of the search.
certaintyalk.val.Certainty | number | string This option specifies a search filter on the Certainty. Default is
alk.val.Certainty.All.citystring This option specifies the city that will be used to search.
citySearchFilterstring This option specifies the city search filter to use. TODO: Various values?
classOverridesArray.<(alk.val.OverrideClass|number)> | string deprecated This option tells the service the travel class overrides. Use 'classOverrides'.
codesArray.<string> | string This option specifies the FIPS codes for counties in the search.
coordsArray.<string> | string This options specifies the coordinates with which to restrict the search. The projection must be EPSG:4356.
countriesArray.<string> | string This option specifies the countries for the search. They must be in the form specified by the countryType parameter.
countryTypestring This option specifies the country type abbreviation the countries parameter is using.
currentSpeednumber | string This option specifies speed of the vehicle in Miles Per Hour.
datasetalk.val.Dataset | number | string The option contains the Dataset parameter for the Service. This option specifies an area dataset that may be pertinent to the request.
displayalk.val.Display | number | string This option tells the service the display type in which to return image data or tiles.
distanceUnitsalk.val.DistanceUnits | number | string This option tells the service that any distance measurements will be delivered in these units, such as
alk.val.DistanceUnits.Kilometersoralk.val.DistanceUnits.Miles.drawerGroupsArray.<(alk.val.DrawerGroup|number)> | string The DrawerGroups parameter for the Service.
elevationLimitnumber | string This option tells the service the distance above sea level to keep the route. Its value is interpreted according to the 'distanceUnits' option.
endTimestring The time before which to search for weather alerts. Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").
estimatedTimeOptsstring This option contains the parameter for the estimated time optimizations. This option only affects routing when roads have time based restrictions. Format is described by this BNF notation:
- fmt ::= DA ('|' Time)?
- Time :: = DayTime | SpecificDateTime
- DA ::= 'Depart' | 'Arrive'
- DayOfWeek ::= 'Monday' | 'Tuesday' | ... | 'Sunday';
- DayTime ::= DayOfWeek '|' TimeOfDay ('|' TimeZone)?
- SpecificDateTime ::= YYYY-MM-DDTHH:MM:SS ('|' TimeZone)?
Examples are: -- Arrive|Monday|18:53|Local -- Depart|2016-04-23T09:43:20|Local -- Arrive (meaning system time)
eventNamesArray.<string> | string This option specifies a search filter on the event names, such as ["Winter Storm Warning", "Flood Watch"].
excludeSearchTypesArray.<string> | string This option specifies the search types to exclude when analysing the query of the search. Their values must come from the
alk.service.SearchTypesSingleSearchService.ferryDiscourageboolean | number | string This option tells the service to avoid ferries when creating the route.
formatalk.val.Format | number This option tells the Service in which format to deliver its image data.
governorSpeedLimitnumber | string This option tells the service the maximum average road speed to use in route calculations that overrides all other road speeds when the are above this value. Default is disabled and valid values are between 1 and 100mph. TODO: Is this always in MPH when distanceUnits is Kilometers?
hazMatalk.val.HazMat | number | string This option tells the service the hazardous material type.
hazMatTypealk.val.HazMat | number | string deprecated This option tells the service the HazMat conditions in effect. Use 'hazMat'.
headingstring | number This option specifies heading. The value is in degrees counter clockwise from East. East = 0, North = 90, West = 180 , South = 270.
heightnumber | string This option tells the service the height in which to return image data or tiles. The value is in pixels.
highwayOnlyboolean | number | string This option tells the service to generate a route that will travel mostly along highways.
histDayalk.val.HistDay | number | string This option tells the service the history in which to return image data or tiles. TODO: Better description.
histTimeBinnumber | string This option tells the service the history in which to return image data or tiles. TODO: Better description.
histTimeZonestring This option tells the service the history in which to return image data or tiles. TODO: Better description.
hosEnabledboolean | number | string This option enables insertion of Hours Of Service Stops.
hosRemCycleDutyTimenumber | string This option indicates the available 'Cycle Time Duty' hours available at the origin until a cycle reset.
hosRemDriveTimenumber | string This option indicates the available driving hours at the origin until the end of the workday.
hosRemDriveTimeUntilBreaknumber | string This option indicates the available driving hours at the origin before the driver needs to take a rest break.
hosRemOnDutyTimenumber | string This option indicates the available 'On-Duty' hours at the origin until the end of the work day.
hosRuleTypealk.val.HosRuleType | number | string This option indicates the hours of service rule to use. Valid values are
alk.val.HosRuleType.USFed607Horalk.val.HosRuleType.USFed708Hfor US Federal Long Haul rules.hostURLstring This option contains the the host and port URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.
hourOffsetnumber | string This option tells the service the hour offset in which to return image data or tiles. TODO: Better description.
hubRoutingboolean | number | string This option tells the service if 'hub routing' is in effect. This means that the starting stop is the hub. The last stop is in effect, not a destination, but a turn around point.
identifierstring The string that identifies the camera.
imgOptionalk.val.ImgOption | number | string This option tells the service which way to deliver the image data. Available values are 'Background', 'Foreground', and 'Both'.
imgSrcalk.val.ImgSrc | number | string This option tells the service from where to get its image data. The available names, such as 'Sat1' and 'Sat2', have specific designations with ALK. Please see {TODO: Need Reference Here} for a current description.
includeLinkInfoboolean | number | string This option specifies the response to include link identifier information.
includePostedSpeedLimitboolean | number | string This option specifies the response to include the posted speed limit information. Good only for ALK licenses that include speed limit.
languagealk.val.Language | string This option tells the service the particular language for the results.
lcvboolean | number | string This option tells whether the truck is a multi-trailer or longer combination vehicle.
listnumber | string This option tells the service how many results to return.
matchNamedRoadsOnlyboolean | number | string This option is tells the service that when it is looking up coordinates to force reverse geocoding to match named roads only.
maxCleanupMilesnumber | string This option is tells the service that when it is looking up coordinates sets maximum radius in which to find the closest matching road.
maxResultsnumber | string This option specifies the max number of results to return. It must be between 1 and 100, inclusive.
minutesnumber | string This option contains the number of driving minutes, with which to size the polygon.
nameFilterstring The results will be filtered by a likeness to this name;
openBordersboolean | number | string This option tells the service if the borders are open for travel.
overrideClassArray.<(alk.val.OverrideClass|number)> | string This option tells the service the classes of vehicle travel. Such as
alk.val.OverrideClass.NationalNetworkoralk.val.OverrideClass.FiftyThreeFoot.overrideRestrictboolean | number | string This option tells the service whether to override truck restrictions.
pathstring This option is the path part of the URL for the particular service. This option is not set by the user, but is automatically generated from the particular service being used.
poiCategoriesArray.<string> | string This options specifies the Points of Interest categories with which to restrict the search. Their values must come from the
alk.service.POICategoriesSingleSearchService.pointArray.<number> | string TODO: What does point mean for WeatherAlerts.
postCodestring This option contains the postal code to use in the search.
postCodeFilterstring This option contains the postal code filter to use in the search. The service uses this option to filter zip codes by country. For example, use 'US' to indicate US zip codes only. Use 'EM' to indicate Mexican postal codes only. Use a sequence of country codes for multiple. TODO: Are they separated by commas?
provideralk.val.Provider | number | string This option tells the service the provider in which to return image data or tiles. The options are Default or RC1.
pt1Array.<number> | string This option pertains to only those services that return single images where the options pt1 and pt2 represent the NorthWest and SouthEast coordinates,respectively. This option holds the NorthWest coordinate.
pt2Array.<number> | string | undefined This option pertains to only those services that return single images where the options pt1 and pt2 represent the NorthWest and SouthEast coordinates,respectively. This option holds the SouthEast coordinate.
radiusnumber | string This option contains the radius in radiusUnits of the search.
radiusUnitsalk.val.DistanceUnits | number | string This option contains the units with which to interpret the radius option.
reduceResponsePointsboolean | number | string This option tells the service whether to reduce the number of response points.
regionalk.val.Region | number | string This option tells the service in which region the retrieved data is to pertain. Some ALK Services switch underlying services due to this option. For instance, traffic data for North America and Europe may come from different underlying services.
requestIdnumber | string | undefined This option contains a caller provided id that will be residing on the options when the call is returned. This parameter helps identify the request. It does not get transmitted to the server.
routeDurationnumber | string This option tells the service the duration route for which to get the road conditions.
routeOptalk.val.RouteOptimization | string | undefined This option tells the service the level of route optimization to use.
routeOptimizationalk.val.RouteOptimization | number | string deprecated This option tells the service what level of route optimization to perform. Use 'routeOpt'.
routePathArray.<Array.<number>> This option tells the service the route for which to get the road conditions.
routePathRequestalkx.route.RoutePathRequest | string This option contains the full route path request to give to the
alk.service.RoutePathService. It can be an object, which is the request, or a JSON.stringified version of it.routeTypealk.val.RouteType | number | string This option tells the service the type of the route requested. It can be
alk.val.RouteType.Practicaloralk.val.RouteType.Shortest.routingTypealk.val.RouteType | number | string deprecated This option tells the route type. See
alkx.RouteServiceOptions#routeType.setIdnumber | string This option contains the setId that names to which the subsequent calls will pertain.
severityalk.val.Severity | number | string This option specifies a search filter on the Severity. Default is
alk.val.Severity.All.sideOfStreetAdherencenumber | string This option indicates the strictness in avoiding the opposite side of the street at the destination. TODO: What is the number range? 0-1?
splcstring This option contains the Standard Point Lookup Code. It is used in place of using street/city/state/zip.
srsalk.val.SRS | number | string This option tells the service the particular projection that is used any GIS data given to the service.
startTimestring The time after which to search for weather alerts. Use standard formats such as ISO8601("2015-08-29T13:45:30-07:00") or RFC1123("Sat, 29 Aug 2015 20:45:30 GMT").
statestring This option contains the state (or provence) to use in the search.
statesArray.<string> | string This option specifies the states with which to restrict the search. Their values must come from the "Abbrev" attribute of states returned from the
alk.service.StatesSingleSearchService.stopTypesArray.<alk.val.StopType> | Object.<number, alk.val.StopType> This option contains an ordered array or indexed object map of the types of each stop given in the 'stops' option.
stopsArray.<Array.<number>> This option contains the stops that the route is to travel along. It is supplied in Spherical Mercator unless, specified by the 'srs' option. It contains an ordered array of coordinates from origin to destination.
stopsAsViaPointsboolean | number | string This option tells the service that all stops in between the origin and the destination are to be treated as not a stop, but a via point.
streetstring This option contains the state (or provence) to use in the search.
strokeWidthnumber | string This option tells the service the stroke width to use in drawing the traffic.
stylealk.val.Style | number | string This option tells the service the style of map that is requested. ALK has a number of different map styles, such as
alk.val.Style.Night, andalk.val.Style.Terrain.timeOffsetstring This option tells the service the offset in time in which to return image weather data or tiles.
TODO: Format?
tollDiscourageboolean | number | string deprecated This option tells the service to avoid tolls. Use 'avoidTolls'.
trkAxlesnumber | string deprecated This option contains the number of axles on the vehicle. Use 'axles'.
trkHeightnumber | string deprecated This option contains the height of the vehicle. Use 'vehicleHeight'.
trkLCVboolean | number | string deprecated This option indicates whether the vehicle is a multi-trailer or longer combination. Use 'lcv'.
trkLengthnumber | string deprecated This option contains the length of the vehicle. Use 'vehicleLength'.
trkUnitsalk.val.VehicleDimensionUnits | number | string deprecated This option contains the measurement units for the vehicle. Use 'vehicleDimensionUnits'.
trkWeightnumber | string deprecated This option contains the weight of the vehicle. Use 'vehicleHeight'.
trkWidthnumber | string deprecated This option contains the width of the vehicle. Use 'vehicleWidth'.
truckConfigalk.val.TruckConfig | number | string This option specifies the particular vehicle configuration, such as
alk.val.TruckConfig.FullSizeVan, etc.urbanboolean | number | string This option specifies that the search is in an urban area.
urgencyalk.val.Urgency | number | string This option specifies a search filter on the Urgency. Default is
alk.val.Urgency.All.vehicleDimensionUnitsalk.val.VehicleDimensionUnits | number | string This option tells the service in what units, metric or otherwise, the vehicle measurements are presented. Can be either
alk.val.VehicleDimensionUnits.English- 12'6", 12.0 (feet)
alk.val.VehicleDimensionUnits.Metric- 4.114 (meters)
vehicleHeightnumber | string This option contains the height measurement of the vehicle.
vehicleLengthnumber | string This option contains the length measurement of the vehicle.
vehicleTypealk.val.VehicleType | number | string This option tells the service the type of vehicle that is requesting the route.
vehicleWeightnumber | string This option contains the weight measurement of the vehicle.
vehicleWidthnumber | string This option contains the width measurement of the vehicle.
widthnumber | string This option tells the service the width in which to return image data or tiles. The value is in pixels.
borderWaitnumber | string | undefined TODO: write description
breakIntervalnumber | string | undefined TODO: write description
breakLengthnumber | string | undefined TODO: write description
citeIntervalnumber | string | undefined TODO: write description
condenseDirectionsboolean | number | string | undefined TODO: write description
costGreenHouseGasnumber | string | undefined TODO: write description
costMaintenanceEmptynumber | string | undefined TODO: write description
costMaintenanceLoadnumber | string | undefined TODO: write description
costPerFuelUnitnumber | string | undefined TODO: write description
costTimeEmptynumber | string | undefined TODO: write description
costTimeLoadnumber | string | undefined TODO: write description
customRoadSpeedsstring | undefined TODO: write description
exchangeRatenumber | string | undefined TODO: write description
fuelEconomyEmptynumber | string | undefined TODO: write description
fuelEconomyLoadnumber | string | undefined TODO: write description
fuelUnitsalk.val.FuelUnits | number | string | undefined TODO: write description
includeFerryDistanceboolean | number | string | undefined TODO: write description
includeTollDataboolean | number | string | undefined TODO: write description
remainingHoursOfServicenumber | string | undefined TODO: write description
reportFormatalk.val.ReportFormat | number | string | undefined TODO: write description
reportsArray.<(alk.val.Report|number)> | string | undefined TODO: write description
routeIdstring | undefined TODO: write description
stopCostsArray.<(alkx.StopCost|string)> | string | undefined TODO: write description
tHoursWithSecondsnumber | string | undefined TODO: write description
tollCurrencyalk.val.TollCurrency | number | string | undefined TODO: write description
tollPlanArray.<(alk.val.TollPlan|number)> | string | undefined TODO: write description
useTrafficboolean | number | string | undefined TODO: write description
futurefunction Function to be called when code is loaded.