Class: RouteMap

cercalia.RouteMap

new cercalia.RouteMap(options)

Name Type Description
options cercaliax.RouteMapOptions

RouteMap options

Methods

calculateRoute(callback)

Calcule the route

Name Type Description
callback function

is called when route has been calculated

getAutoCalculateRoute(){boolean}

Returns:
autoCalculateRoute

getCenterToRoute(){boolean}

Returns:
centerToRoute

getClass(){string}

Returns:
ClassName.

getFeatures(){Array.<Feature>}

getServiceOptions(){cercaliax.service.RoutingOptions}

hasDestination(){boolean}

Returns:
return true if routeService has Destination, otherwise false.

hasOrigin(){boolean}

Returns:
return true if routeService has Origin, otherwise false.

Hide routeMap contextMenu

Clear route (Remove route feature and route markers).

setAutoCalculateRoute(autoCalculateRoute){cercalia.RouteMap}

Name Type Description
autoCalculateRoute boolean
Returns:
this

setCenterToRoute(centerToRoute)

Center to the router

Name Type Description
centerToRoute boolean

setDestination(destination, calculateRoute, text)

Set destination of route

Name Type Description
destination cercalia.LonLat | Object
calculateRoute boolean

calculateRoute -> true Calcule route; calculateRoute -> false NO Calcule route; calculateRoute -> undefined depends of autoCalculateRoute

text string

label text for marker

setOrigin(origin, calculateRoute, text)

Set origin of route

Name Type Description
origin cercalia.LonLat | Object
calculateRoute boolean

calculateRoute -> true Calcule route; calculateRoute -> false NO Calcule route; calculateRoute -> undefined depends of autoCalculateRoute

text string

label text for marker

setServiceOptions(opt)

Name Type Description
opt cercaliax.service.RoutingOptions

setStep(step, calculateRoute, text, position)

Set step of route

Name Type Description
step cercalia.LonLat | Object
calculateRoute boolean

calculateRoute -> true Calcule route; calculateRoute -> false NO Calcule route; calculateRoute -> undefined depends of autoCalculateRoute

text string

label text for marker

position integer

setWidget(widget)

Name Type Description
widget cercalia.widget.Routing

setWidgetReport(widget)

Name Type Description
widget cercalia.widget.RoutingReport

Syncronize routeMap with widget. Widget fills RouteMap.

Name Type Description
widget cercalia.widget.Routing