Class PolylineRouteProvider extends BaseRouteProvider

This class implements the BaseRouteProvider for a polyline or circle. It's not possible to instanciate this class because the class is not exported from the module. Only one instance is created and added to the list of Providers of TravelNotes

Source : file routeProviders/PolylineRouteProvider.js at line 46

Constructor

new PolylineRouteProvider ( )

The constructor

Source : file routeProviders/PolylineRouteProvider.js at line 356

Public getters and setters

readonly get icon : String

The icon used in the ProviderToolbarUI. Overload of the base class icon property

Source : file routeProviders/PolylineRouteProvider.js at line 378

readonly get name : String

The provider name. Overload of the base class name property

Source : file routeProviders/PolylineRouteProvider.js at line 391

readonly get providerKeyNeeded : Boolean

A boolean indicating when a provider key is needed for the provider. Overload of the base class providerKeyNeeded property

Source : file routeProviders/PolylineRouteProvider.js at line 416

readonly get title : String

The title to display in the ProviderToolbarUI button. Overload of the base class title property

Source : file routeProviders/PolylineRouteProvider.js at line 399

readonly get transitModes : Array of String

The possible transit modes for the provider. Overload of the base class transitModes property Must be a subarray of [ 'bike', 'pedestrian', 'car', 'train', 'line', 'circle' ]

Source : file routeProviders/PolylineRouteProvider.js at line 408

Public methods

getPromiseRoute ( route )

Call the provider, using the waypoints defined in the route and, on success, complete the route with the data from the provider

Source : file routeProviders/PolylineRouteProvider.js at line 367

Parameters

Name Type Description
route Route

The route to witch the data will be added

Returns

A Promise. On success, the Route is completed with the data given by the provider.
Type : Promise

Private properties

#route : Route

A reference to the edited route

Source : file routeProviders/PolylineRouteProvider.js at line 53

Private getters and setters

readonly static get #ICON_NAMES : Object

Enum for icons names

Source : file routeProviders/PolylineRouteProvider.js at line 74

readonly static get #INSTRUCTIONS_LIST : Object

Translations for instructions

Source : file routeProviders/PolylineRouteProvider.js at line 60

Private methods

#addIntermediateItineraryPoints ( startWayPoint, endWaypoint )

This method add 64 intermediates points on a stuff of great circle

Source : file routeProviders/PolylineRouteProvider.js at line 125

Parameters

Name Type Description
startWayPoint WayPoint

The starting wayPoint

endWaypoint WayPoint

The ending wayPoint

#addItineraryPoint ( latLng )

Add a itineraryPoint to the itineraryPoints collection

Source : file routeProviders/PolylineRouteProvider.js at line 112

Parameters

Name Type Description
latLng Array of Number

The position of the itineraryPoint

Returns

The objId of the new itineraryPoint
Type : Number

#addManeuver ( itineraryPointObjId, position )

Add a maneuver to the itinerary

Source : file routeProviders/PolylineRouteProvider.js at line 90

Parameters

Name Type Description
itineraryPointObjId Number

The objId of the itineraryPoint linked to the maneuver

position String

The position of the maneuver. Must be kStart or kEnd

#parseCircle ( )

This function set a circle as itinerary

Source : file routeProviders/PolylineRouteProvider.js at line 257

#parseGreatCircle ( )

Set a stuff of great circle as itinerary

Source : file routeProviders/PolylineRouteProvider.js at line 207

#parseResponse ( onOk, onError )

Build a polyline (as stuff of a great circle) or a circle from the start and end wayPoints

Source : file routeProviders/PolylineRouteProvider.js at line 329

Parameters

Name Type Description
onOk Function

A function to call when the response is parsed correctly

onError Function

A function to call when an error occurs