Class: Routing

cercalia.widget.Routing

new cercalia.widget.Routing(options)

Constructor del widget Routing

Name Type Description
options

Opciones del widget de Routing.

Name Type Description
div string

Widget DIV container ID.

height string | function

DIV height. Default value "auto".

initialBoxes number

Initial number of boxes. Default value 2.

maxBoxes number

Maximum number of boxes (till 10). Default value 10.

showUI function

Function to show the widget DIV when route is modified with the map.

logistics string | undefined optional

Indicates if the normal network, logstics network or both are activated

defaultCountry string

Default selected country in select inputs. Values must be in ISO 3166 alpha-3. If not specified it must be ALL. Examples ESP or FRA.

Methods

Fills service with the logistics options that the users indicated

Name Type Description
service cercalia.service.Routing | cercalia.service.LogisticsRouting

Fills service with the rute options that the users indicated

Name Type Description
service cercalia.service.Routing | cercalia.service.LogisticsRouting

Añade una caja al fina de la lista de puntos de parada.

Añade una caja al final de la lista de puntos.

Limpia las cajas y la ruta dibujada en el mapa

Limpia las cajas no utilizadas para el calculo de ruta (minimo deja dos)

Create report

Name Type Description
data Object

Cercalia object JSON

Get autocomplete widgets

Returns:
List autocompletes widgets.

Return object type.

Return number of boxs.

Get Options Route

Returns:
list of geocodings
Returns:
true if it's a logistics route, otherwise false.

Print route

Reordena los contenidos de las cajas segun se haya modificado. Tambien las imagenes de cada caja....

Name Type Description
recenter boolean

Centra el mapa con los marcadores de ruta.

override boolean

removeStep(position){cercalia.widget.routing}

Remove step in the position indicated in the parameter position moving the other points.

Name Type Description
position number
Returns:
this

removeStepDrag(lonLat, position){cercalia.widget.routing}

treu el punt dragable, en la posició indicada movent els altres punts a la cua.

Name Type Description
lonLat cercalia.LonLat
position number
Returns:
this

Recalcula el tamaño del widget

Name Type Description
height: number

Altura del widget. Si no se define y se ha definido una funcion de height se recalculara utilizando esta.

Save route as KML.

Set del origen de la ruta.

Name Type Description
destination string | cercalia.LonLat

Nombre a buscar o latitud y longitud del destino

Modifica el mapa con el que interactua el widget.

Name Type Description
map cercalia.Map

Mapa con el que interactuará el Widget.

Set del origen de la ruta.

Name Type Description
origin string | cercalia.LonLat

Nombre a buscar o latitud y longitud del origen

Name Type Description
routeMap cercalia.RouteMap

Set del punto de paso de la ruta.

Name Type Description
waypoint string | cercalia.LonLat

Nombre a buscar o latitud y longitud del destino.

position number

Posición del punto de paso.

setStepDrag(lonLat, position, override)

posa el el punt, en la posició indicada movent els altres punts a la cua.

Name Type Description
lonLat cercalia.LonLat
position number
override boolean