API Docs for: 2.2
Show:

MQ.routing Class

Methods

Methods

directions

(
  • [options]
)
MQ.Routing.Directions

This is a helper function which returns a new MQ.Routing.Directions and initializes it with the key used to fetch the plugins.

 var map = L.map('map', {
         layers: MQ.mapLayer(),
         center: [ 38.895345, -77.030101 ],
         zoom: 15
     }),

     dir = MQ.routing.directions();

 dir.route({
     locations: [
         'parker co',
         '8500 pena blvd denver co'
     ],
     options: { avoids: ['toll road'] }
 });

 map.addLayer(MQ.routing.routeLayer({
     directions: dir,
     fitBounds: true
 });

Parameters:

  • [options] Object optional
    • [key] String optional

      MQ API key