API Docs for: 7.2
Show:

MQA.RouteCollection Class

Module: MQA

MQA.RouteCollection

Constructor

MQA.RouteCollection

(
  • options
)

Parameters:

  • options Object
    • key String

      the optional key for this overlay

    • display Object
      • color String the color of the ribbon
      • colorAlpha String the color alpha of the ribbon
      • borderWidth Number the width of the route ribbon
      • draggable Boolean if the route is draggable
      • draggablepoi Boolean if the route's pois/waypoints are draggable
      • dragComplete Function the function to call if the route drag completes, returns the new RouteResult
    • route RouteResult

      the result of a route (with a route.shape)

    • shape Object

      the shape response, if no route is provided

    • line Array

      an array of latlngs, if no route or shape is provided

    • pois Array

      an array of pois if no route is provided

Methods

_createStopPoi

(
  • location
  • stopNumber
)
MQA.Poi private

create a stop poi

Parameters:

  • location Location
  • stopNumber Integer

Returns <MQA.Poi>

_createViaPoi

(
  • location
)
MQA.Poi private

create a via poi

Parameters:

  • location Location

Returns <MQA.Poi>

_dragDispatcher

(
  • drageQueue
)
private

drag dispatcher

Parameters:

_dragRouteCallback

(
  • isIndert
  • dragResponse
)
private

drage route callback

Parameters:

_onPoiEvent

(
  • eventType
  • mqe
)
private

on poi event

Parameters:

_queueDragRequest

(
  • dragRouteRequest
  • callback
  • cookie
)
private

queue drag requests

Parameters:

_renderLocations

(
  • opts
)
private

render locations to poi

Parameters:

_renderStopPoi

(
  • location
  • stopNumber
  • locationIndex
)
MQA.Poi private

render poi

Parameters:

  • location Location
  • stopNumber Integer
  • locationIndex Integer

Returns <MQA.Poi>

_stopDragTimer

() private

stop drag timer

clearDragState

()

Clear the current drag state

getLocations

()

get locations

getPois

()

get pois

getRibbon

() MQA.RibbonOverlay

get ribbon

Returns <MQA.RibbonOverlay>

getRouteOptions

() Object

get routing options

Returns <Object>

onDrop

() private

on drop

onPoiDrag

(
  • poi
)
private

on poi drag

Parameters:

onPoiDrop

(
  • poi
  • cancelled
)
private

on poi drop

Parameters:

onRibbonDrag

(
  • ribbon
)
private

on ribbon drag

Parameters:

onRibbonDragCancel

(
  • ribbon
)
private

on ribbon drag cancel

Parameters:

onRibbonDragDrop

(
  • ribbon
)
private

on ribbon drag drop

Parameters:

onRibbonDragStart

(
  • ribbon
)
private

on ribbon drag start

Parameters:

recomputeChangedRoute

(
  • mergedLocations
)
private

recompute changed route

Parameters:

  • mergedLocations Array of Locations

removeLocationAt

(
  • index
)

remove location from collection

Parameters:

  • index Integer

setRouteOptions

(
  • opts
)

set routing options

Parameters: