Route class which wraps responses from the routing service (see EMS.Service.Route).
| EMS. | Route class which wraps responses from the routing service (see EMS.Service.Route). |
| Properties | |
| handle | {EMS.Route.Handle} Route handle, an id and expiry. |
| distance | {Float} The distance in metres. |
| duration | {Integer} The duration in seconds. |
| startPoint | {OpenLayers.LonLat}. |
| endPoint | {OpenLayers.LonLat} |
| bounds | {OpenLayers.Bounds} |
| legs | {Array(EMS.Route.Leg)} |
| routes | Deprecated: Use EMS.Route.legs. |
| Constructor | |
| EMS. | |
| EMS. | Handle information of a route. |
| Properties | |
| id | {String} Identifier for the route. |
| expiry | {String} Expiry time stamp. |
| Constructor | |
| EMS. | |
| Functions | |
| equals | |
| clone | {EMS.Route.Handle} Returns a clone of the handle. |
| toString | {String} A string representation of the handle, in this case just the id. |
| EMS. | A leg (or sub route) of a route. |
| Properties | |
| distance | {Float} The distance in metres. |
| duration | {Integer} The duration in seconds. |
| startPoint | {OpenLayers.LonLat}. |
| endPoint | {OpenLayers.LonLat} |
| bounds | {OpenLayers.Bounds} |
| segments | {Array(EMS.Route.Segments)} Segments which make up the leg of the route. |
| Constructor | |
| EMS. | |
| Functions | |
| getGeometry | {OpenLayers.Geometry.Collection} A collection of geometry objects representing the leg. |
| EMS. | An individual segment within a EMS.Route.Leg. |
| Properties | |
| id | {Integer} id of the segment within the EMS.Route.Leg. |
| bounds | {OpenLayers.Bounds} is the bounds of the segment. |
| distance | {Float} The distance in metres. |
| duration | {Integer} The duration in seconds. |
| startPoint | {OpenLayers.LonLat}. |
| geometry | {OpenLayers.Geometry} The actual geometry of the segment. |
| instruction | {EMS.Route.Instruction} |
| Constructor | |
| EMS. | |
| EMS. | Instruction used in a EMS.Route.Segment. |
| Properties | |
| road | {String} Road type. |
| suburb | {String} Suburb name. |
| street | {String} Street name. |
| angles | {Object} Angle information. |
| bearing | {String} Bearing name such as “SOUTH”. |
| text | {String} Textual instruction. |
| maneuver | {Object} An object with with two properties, the type and feature. |
| Constructor | |
| EMS. | |
| Properties | |
| format | Convenience method to replace the underscore characters with HTML tags. |
| clone | {EMS.Route.Instruction} Returns a clone of this instruction. |
| toString | {String} Returns the EMS.Route.Instruction.text for convenience. |
{EMS.Route.Handle} Route handle, an id and expiry.
{Array(EMS.Route.Leg)}
Deprecated: Use EMS.Route.legs.
| route | {Mixed} is either an EMS.Route or a plain {Object} to wrap. |
Handle information of a route.
| Properties | |
| id | {String} Identifier for the route. |
| expiry | {String} Expiry time stamp. |
| Constructor | |
| EMS. | |
| Functions | |
| equals | |
| clone | {EMS.Route.Handle} Returns a clone of the handle. |
| toString | {String} A string representation of the handle, in this case just the id. |
equals: function( handle )
| handle | {Mixed} is either an EMS.Route.Handle or a plain {Object} to test for equality. |
{Boolean} Returns true if the input handle equals this handle.
A leg (or sub route) of a route.
| Properties | |
| distance | {Float} The distance in metres. |
| duration | {Integer} The duration in seconds. |
| startPoint | {OpenLayers.LonLat}. |
| endPoint | {OpenLayers.LonLat} |
| bounds | {OpenLayers.Bounds} |
| segments | {Array(EMS.Route.Segments)} Segments which make up the leg of the route. |
| Constructor | |
| EMS. | |
| Functions | |
| getGeometry | {OpenLayers.Geometry.Collection} A collection of geometry objects representing the leg. |
{Array(EMS.Route.Segments)} Segments which make up the leg of the route.
| leg | {Mixed} is either an EMS.Route.Leg or {Object} to wrap, may be null. |
getGeometry: function()
{OpenLayers.Geometry.Collection} A collection of geometry objects representing the leg. This will never return null but may return an empty collection.
An individual segment within a EMS.Route.Leg. This contains the geometry, bounds and instruction information.
| Properties | |
| id | {Integer} id of the segment within the EMS.Route.Leg. |
| bounds | {OpenLayers.Bounds} is the bounds of the segment. |
| distance | {Float} The distance in metres. |
| duration | {Integer} The duration in seconds. |
| startPoint | {OpenLayers.LonLat}. |
| geometry | {OpenLayers.Geometry} The actual geometry of the segment. |
| instruction | {EMS.Route.Instruction} |
| Constructor | |
| EMS. |
{Integer} id of the segment within the EMS.Route.Leg.
{OpenLayers.Bounds} is the bounds of the segment.
{OpenLayers.Geometry} The actual geometry of the segment. This is used when drawn on a map and can be a OpenLayers.Geometry.LineString or OpenLayers.Geometry.MultiLineString.
| segment | {Mixed} is either an EMS.Route.Segment or a plain {Object} to wrap. This may be null. |
Instruction used in a EMS.Route.Segment.
| Properties | |
| road | {String} Road type. |
| suburb | {String} Suburb name. |
| street | {String} Street name. |
| angles | {Object} Angle information. |
| bearing | {String} Bearing name such as “SOUTH”. |
| text | {String} Textual instruction. |
| maneuver | {Object} An object with with two properties, the type and feature. |
| Constructor | |
| EMS. | |
| Properties | |
| format | Convenience method to replace the underscore characters with HTML tags. |
| clone | {EMS.Route.Instruction} Returns a clone of this instruction. |
| toString | {String} Returns the EMS.Route.Instruction.text for convenience. |
{Object} An object with with two properties, the type and feature.
| instruction | {Mixed} is either an EMS.Route.Instruction or a plain {Object} to wrap. |
{EMS.Route.Instruction} Returns a clone of this instruction.
{String} Returns the EMS.Route.Instruction.text for convenience.
equals: function( handle )
{EMS.Route.Handle} Returns a clone of the handle.
clone: function()
{String} A string representation of the handle, in this case just the id.
toString: function()
{OpenLayers.Geometry.Collection} A collection of geometry objects representing the leg.
getGeometry: function()