Combining the other classes into a full routing user interface. The main class of the plugin. Extends L.Control.

Usage example

var map = L.map('map');

L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);

L.Routing.control({
waypoints: [
L.latLng(57.74, 11.94),
L.latLng(57.6792, 11.949)
]
}).addTo(map);

Hierarchy

Constructors

Properties

controlOptions: ControlOptions
map?: Map

Methods

  • Parameters

    Returns void

  • Allows adding, removing or replacing waypoints in the control’s plan. Syntax is the same as in Array#splice.

    Parameters

    • startIndex: number
    • deleteCount: number = 0
    • Rest ...newWaypoints: Waypoint[]

    Returns void

  • Returns boolean

  • Returns boolean

Generated using TypeDoc