Class: Routing

(abstract) bemap.Routing(context, options)

Base class for routing calculation.

Constructor

(abstract) new Routing(context, options)

Parameters:
Name Type Description
context bemap.Context BeMap-JS-API Context. Mandatory.
options object see below the available values.
Source:

Members

criterias :bemap.Criteria

Array of route Criteria.
Type:
  • bemap.Criteria
Source:

(protected) destinations :bemap.Coordinates

Destinations
Type:
  • bemap.Coordinates
Source:

(protected) geometryId :String

ID of geometry.
Type:
  • String
Source:

(protected) markerMapObject :bemap.Marker

Marker(s) list.
Type:
Source:

(protected) nativeBeMapParams :String

Native parameters of BeMap server.
Type:
  • String
Source:

(protected) poylineAsPolygon :boolean

Draw a polygon with the polyline array.
Type:
  • boolean
Source:

(protected) routes :bemap.Route

Calculated route(s).
Type:
Source:

(protected) stopPoints :Object

Vias(s) list.
Type:
  • Object
Source:

Methods

cleanMarkers() → {bemap.markerMapObject}

Clean the markerMapObject object.
Source:
Returns:
this
Type
bemap.markerMapObject

compute(options) → {bemap.Routing}

Execute the routing calculation.
Parameters:
Name Type Description
options object See below the available values.
Properties
Name Type Description
geoserver String Geoserver name will be used for this computation.
success function the function to call in case of successed request.
failed function the function to call in case of failed request.
Source:
Returns:
this
Type
bemap.Routing

createMarker(options, listener) → {bemap.markerMapObject}

Show the destinations markers on map.
Parameters:
Name Type Description
options.map bemap.Map the new marker to set.
options Object See below the available values.
listener listener return click on marker.
Source:
Returns:
Return this.
Type
bemap.markerMapObject

getFirstRoute() → {bemap.Route}

Get the calculated route object.
Source:
Returns:
the calculated route.
Type
bemap.Route

getRoute(index) → {bemap.Route}

Get the calculated route object.
Parameters:
Name Type Description
index integer of route.
Source:
Returns:
the calculated route.
Type
bemap.Route

getRoutes(index) → {bemap.Route}

Get the calculated route object.
Parameters:
Name Type Description
index integer of route.
Source:
Returns:
the calculated route.
Type
bemap.Route

reset() → {bemap.Routing}

Reset the Routing object. Clear the previous result.
Source:
Returns:
this
Type
bemap.Routing

resetRoute() → {bemap.Routing}

Reset the Routing object. Clear the previous result.
Source:
Returns:
this
Type
bemap.Routing

showOnMap(map, options) → {bemap.Routing}

Show the route(s) on map.
Parameters:
Name Type Description
map bemap.Map the new color of text border to set.
options Object See below the available values.
Properties
Name Type Description
polylineStyle bemap.LineStyle Style of line used by the renderer.
chargingStationStepImageSrc String Image path of pool stations.
chargingStationStepNoPopup String If set to true, disable the popup when the icon is clicked.
chargingStationPopupTextCallback function Function called wehen a pool statiion is clicked, the called function get the step point object and return the text of popup.
Source:
Returns:
Return this.
Type
bemap.Routing

showOnMapMarkers(map, options, listener) → {bemap.markerMapObject}

Show the destinations markers on map.
Parameters:
Name Type Description
map bemap.Map the new marker to set.
options Object See below the available values.
Properties
Name Type Description
layer bemap.Layer Layer for markers.
response Object Optionally response from geocoding or list of coords.
listener listener return click on marker.
Source:
Returns:
Return this.
Type
bemap.markerMapObject