Telogis.GeoBase.Routing |
Contains classes related to vehicle routing and getting driving directions.
Name | Description |
---|---|
Routing.ArrivalMovementEvent | A wrapper class to be filled server-side that represents an arrival movement. |
Routing.ArriveEvent | A wrapper class to be filled server-side that represents an arrival event. |
Routing.DepartEvent | A wrapper class to be filled server-side that represents a departure event. |
Routing.DepartureMovementEvent | A wrapper class to be filled server-side that represents a departure movement. |
Routing.Direction | A wrapper class to be filled server-side, representing a single instruction in a Routing.Route. |
Routing.Directions | A representation of a driving route through a number of stops. This is a wrapper class to be filled server-side. |
Routing.DrivingEvent | A base class, populated server-side, that represents an event that occurs en route -- such as a driving direction or movement. |
Routing.DrivingNote | A wrapper class to be filled server-side that represents a note attached to a direction. |
Routing.FerryMovementEvent | A wrapper class to be filled server-side that represents a ferry movement. |
Routing.FFRampMovementEvent | A wrapper class to be filled server-side that represents an FF ramp movement. |
Routing.FreewayEndsNoteEvent | A wrapper class to be filled server-side that represents a Routing.DrivingNote, denoting a street name change. |
Routing.FSRampMovementEvent | A wrapper class to be filled server-side that represents an FS ramp movement. |
Routing.LoadElementType | Describes a type of load |
Routing.Movement | A wrapper class to be filled server-side that represents a driving direction instructing the driver to turn at an intersection. |
Routing.MovementEvent | A wrapper class to be filled server-side that represents a Routing.DrivingEvent that happens during a movement. |
Routing.NameChangeNoteEvent | A wrapper class to be filled server-side that represents a Routing.DrivingNote, denoting a street name change. |
Routing.Note | A wrapper class to be filled server-side that represents a note attached to a direction. |
Routing.RampMovement | A base class representing a movement event along a freeway ramp. |
Routing.RoundAboutMovementEvent | A wrapper class to be filled server-side that represents a roundabout movement. |
Routing.Route | A class for constructing point-to-point directions and optimizing multi-stop routes.
JavaScript var LatLon = Telogis.GeoBase.LatLon; var RouteStop = Telogis.GeoBase.Routing.RouteStop; // Create three route stops var RouteStop1 = new RouteStop(new LatLon(33.587512,-117.741400)); var RouteStop2 = new RouteStop(new LatLon(33.553872,-117.728464)); var RouteStop3 = new RouteStop(new LatLon(33.537614,-117.687859)); // Create an array of route stops var StopsArray = [RouteStop1, RouteStop2, RouteStop3]; // Specify a routing strategy -- RoutingStrategyFastest is the default var RoutingStrategyFastest = new Telogis.GeoBase.Routing.RoutingStrategyFastest(); // Create a new route var myRoute = new Telogis.GeoBase.Routing.Route({ stops: StopsArray, strategy: RoutingStrategyFastest }); // Was the route created? Check that there are three stops... // document.onclick = myTestFunction; function myTestFunction() { alert ('There are ' + myRoute.getStopCount() + ' stops in this route.'); }; |
Routing.RouteStop | A wrapper class for containing a route stop in a format understood by the server. In all other situations,
LatLons should be used instead, and since the conversion between the two is handled
by the Routing.Route class, this class need not be used directly.
JavaScript var myRouteStop = new Telogis.GeoBase.Routing.RouteStop(new Telogis.GeoBase.LatLon(33.612914,-117.745395)); |
Routing.RoutingProfile | A class used to determine the speed profile (the permitted speed of travel), based on either speed category or
a custom speed profile generated using an array of 48 speed values (one for each functional class and speed combination).
This array is constructed using six consecutive blocks of eight elements. Each block represents a functional class (1-6), the
first block represents functional class 1, the second block functional class 2, etc.
The first element in the each block corresponds to speed category 1, the second element speed category 2, etc.
These profiles are used when routing, and applied as a Routing.RoutingStrategy.
JavaScript var speed = Telogis.GeoBase.SpeedUnit.MilesPerHour; var strategy = new Telogis.GeoBase.Routing.RoutingStrategyFastest(); var profile = new Telogis.GeoBase.Routing.RoutingProfile(); // For every speed category (1-8) for (speedCat = 1; speedCat <9; ++speedCat) { // And every functional class (1-6) for (var funcClass = 1; funcClass < 7; ++funcClass) { // Set the profile speed to 10mph profile.setSpeed(speedCat, funcClass, 10, speed); } } // Apply the routing profile to the strategy in the UK strategy.setProfile("UK", profile); |
Routing.RoutingStrategy | Describes a set of constraints to which the routing engine should adhere when calculating
a route.
JavaScript // Create a strategy that allows u-turns, road crossings and travel along toll roads. var myStrategy = new Telogis.GeoBase.Routing.RoutingStrategy({ allowUTurns: true, extraProcessingRatio: 1, roadCrossingBehavior: 'Telogis.GeoBase.Routing.RoadCrossingBehavior.ALLOWED', // ALLOWED is the default. Alternative options are 'DISCOURAGED' and 'FORBIDDEN' useTollRoads: true }); // Create a route var myRoute = new Telogis.GeoBase.Routing.Route(); // Apply the strategy to the route myRoute.setStrategy(myStrategy); |
Routing.RoutingStrategyFastest | A type of Routing.RoutingStrategy that specifies a custom callback
on the server to favor faster routes.
JavaScript var fastest_strategy = new Telogis.GeoBase.Routing.RoutingStrategyFastest(); route.setStrategy(fastest_strategy); |
Routing.RoutingStrategyShortest | A type of Routing.RoutingStrategy that specifies a custom callback
on the server to favor shorter routes.
JavaScript var shortest_strategy = new Telogis.GeoBase.Routing.RoutingStrategyShortest(); route.setStrategy(shortest_strategy); |
Routing.SFRampMovementEvent | A wrapper class to be filled server-side that represents an SF ramp movement. |
Routing.SplitMovementEvent | A wrapper class to be filled server-side that represents a split movement. |
Routing.StateChangesNoteEvent | A wrapper class to be filled server-side that represents a Routing.DrivingNote, denoting a street name change. |
Routing.TollwayBeginsNoteEvent | A wrapper class to be filled server-side that represents a Routing.DrivingNote, denoting a street name change. |
Routing.TollwayEndsNoteEvent | A wrapper class to be filled server-side that represents a Routing.DrivingNote, denoting a street name change. |
Routing.TurnMovement | A wrapper class to be filled server-side that represents a turn movement. |
Routing.VehicleSpec | Used to describe a vehicle's specifications.
JavaScript // Create a new vehicle specifications object var VehSpec = new Telogis.GeoBase.Routing.VehicleSpec(); // Set some vehicle properties (weight, height, length, width etc.) VehSpec.GrossWeight_kg = 30000; // 30 tonnes VehSpec.Height_cm = 410; // 4.1 meters high VehSpec.Length_cm = 1800; // 18 meters long VehSpec.Width_cm = 260; // 2.6 meters wide // Apply the VehicleSpec to a route -- // Routes will now be generated that are safe for a vehicle with // the described specifications. For example, avoiding bridges // that are too low or too narrow, or that cannot support the // vehicle's weight myRoute.setVehicleSpec(VehSpec); |
Routing.VehicleType | Describes a type of vehicle. When applied to a route as a vehicle specification, routes suitable for the specified vehicle type will be generated. For example,
Emergency vehicles will be routed using emergency vehicle lanes and directions; and Taxi, CarPool and Bus vehicle types will be routed along suitable
restricted traffic lanes where available.
JavaScript // Create a new vehicle specifications object var VehSpec = new Telogis.GeoBase.Routing.VehicleSpec(); // Set the vehicle type (tractor semi trailer) VehSpec.VehicleType = Telogis.GeoBase.Routing.VehicleType.TractorSemiTrailer; // Apply the VehicleSpec to a route -- // Routes will now be generated that are legal for the vehicle type myRoute.setVehicleSpec(VehSpec); |
Routing.Waypoint | A wrapper class for containing a waypoint in a format understood by the server. In all other situations, LatLons should be used instead, and since the conversion between the two is handled by the Routing.Route class, this class need not be used directly. |
Routing.WayPointEvent | A wrapper class to be filled server-side that represents a waypoint event. |
Name | Description |
---|---|
getLocation () | Gets the latitude-longitude coordinates of the location associated with this Routing.FerryMovementEvent. ReturnsLatLon - The location of the note. |
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RoadCrossingBehavior | Object | A set of codes that instruct the routing engine to treat road crossings in a certain way. Properties
|