onViaPointReached
Notification
Notification when a waypoint is reached
A notification BeNav sends once you subscribe to it with
setupNotifications. Your application receives it as described in Receiving messages.Fires as the vehicle reaches an intermediate point of the current route. For a client application driving a multi-stop round, this is how a stop is confirmed as served without asking the driver to confirm anything.
It carries the identifier the client application gave that point when it sent the route, so the stop maps straight back to whatever it represents: an order, a collection, a customer.
Worth knowing
- It also reports a point that was skipped rather than reached, so a round can be reconciled honestly.
Configuration#
json
{
"name":"onViaPointReached",
"params": {
"enabled": true
}
}Notification Data#
json
{
"jsonrpc": "2.0",
"method": "onViaPointReached",
"params" :
{
"id" : String,
"lat" : Double,
"long" : Double,
"skipped": Boolean
}
}id: identifier of thewaypointlat/long: WGS84 coordinates of the waypoint. Note the key islonghere, notlonas instartGuidancewaypoints.skipped(Circuit Navigation) Specifies if the via-point has been reached or skipped.
Example of json response
json
{
"jsonrpc": "2.0",
"method": "onViaPointReached",
"params": {
"id": "waypoint_villeneuve",
"lat": 43.6358234375,
"long": 7.131742080750791,
"skipped": false
}
}