AtlasCT.com
User Manual v5.0

Route

Inheritance: EventListener > Route

The Route class is used to execute a route between two or more locations.
Each location can be presented by an Address or by a LatLong coordinate.
The Route class holds the route data, the route is displayed on the Map by the RouteVectorLayer object.


Summary
Inheritance: EventListener > Route
The Route constructor.
Adds a new location by an address.
Adds a new location by coordinate.
Clears all route locations.
Execute the route with the initialized locations.
Returns the route type.
Sets the route destination location by an address.
Sets the route destination location by coordinate.
Sets the route origin location by an address.
Sets the route origin location by coordinate.
Sets the route type.
Sets the route type as fastest path.
Sets the route type as shortest path.
Sets the route type as a path to pedestrian.
Sets the route type as a fastest path with use of tollways.
Sets the route type as a shortest path with use of tollways.

Constructors

Route

Route()

The Route constructor.  Creates a new route instance.

addLocation

addLocation(LatLong coordinate)

Adds a new location by coordinate.

Parameters

coordinatea new origin coordinate.

See Also

setOriginLocation, setDestinationLocation

addLocation

addLocation(Address address)

Adds a new location by an address.

Parameters

addressa new origin address.

See Also

setOriginLocation, setDestinationLocation

clearLocations

addLocation()

Clears all route locations.

execute

execute( string countryCode)

Execute the route with the initialized locations.

Parameters

countryCodeISO ALPHA-3 country code(optional).

See Also

setOriginLocation, setDestinationLocation, addLocation

getType

Route Types setType()

Returns the route type.

Returns

The route type.

See Also

setType

setDestinationLocation

setDestinationLocation(LatLong coordinate)

Sets the route destination location by coordinate.

Parameters

coordinatea new origin coordinate.

See Also

setOriginLocation

setDestinationLocation

setDestinationLocation(Address address)

Sets the route destination location by an address.

Parameters

addressa new origin address.

See Also

setOriginLocation

setOriginLocation

setOriginLocation(LatLong coordinate)

Sets the route origin location by coordinate.

Parameters

coordinatea new origin coordinate.

See Also

setDestinationLocation

setOriginLocation

setOriginLocation(Address address)

Sets the route origin location by an address.

Parameters

addressa new origin address.

See Also

setDestinationLocation

setType

setType(Route Types type)

Sets the route type.

Parameters

typethe new route type.

See Also

getType

Route Types

Route. TYPE_FASTEST

Route.TYPE_FASTEST

Sets the route type as fastest path.

Route. TYPE_SHORTEST

Route.TYPE_SHORTEST

Sets the route type as shortest path.

Route. TYPE_PEDESTRIAN

Route.TYPE_PEDESTRIAN

Sets the route type as a path to pedestrian.

Route. TYPE_FASTEST_WITH_TOLLWAY

Route.TYPE_FASTEST_WITH_TOLLWAY

Sets the route type as a fastest path with use of tollways.

Route. TYPE_SHORTEST_WITH_TOLLWAY

Route.TYPE_SHORTEST_WITH_TOLLWAY

Sets the route type as a shortest path with use of tollways.

The EventListener class helps you to register event handlers defined by this API.
Some of the classes that inherit from this class are: Map, OverviewMap, LayersManager
Route()
The Route constructor.
setOriginLocation(LatLong coordinate)
Sets the route origin location by coordinate.
setDestinationLocation(LatLong coordinate)
Sets the route destination location by coordinate.
addLocation(LatLong coordinate)
Adds a new location by coordinate.
addLocation()
Clears all route locations.
setType(Route Types type)
Sets the route type.
Route Types setType()
Returns the route type.
execute()
Execute the route with the initialized locations.
Route.TYPE_FASTEST
Sets the route type as fastest path.
Route.TYPE_SHORTEST
Sets the route type as shortest path.
Route.TYPE_PEDESTRIAN
Sets the route type as a path to pedestrian.
Route.TYPE_FASTEST_WITH_TOLLWAY
Sets the route type as a fastest path with use of tollways.
Route.TYPE_SHORTEST_WITH_TOLLWAY
Sets the route type as a shortest path with use of tollways.
The Address class represent a specific address information, with its coordinates.
Inheritance: Coordinate > LatLong

Inheritance: EventListener > Map
The RouteVectorLayer class is the presented layer of a route above the map.
With this class, you can set the route style.