Search for content

Events

A single route event contains information which might be interesting for the driver or characterizes the course of the route such as reaching a waypoint, entering a different country or subdivision, or executing a certain maneuver.

The list of route events in RouteResponse.events is ordered chronologically along the route. The events to be returned can be selected by using the results paramter.

 

This example shows how to request a route with border events.

https://api.myptv.com/routing/v1/routes?waypoints=48.8281361,8.130226135&waypoints=48.847332494,8.058471679&results=BORDER_EVENTS&options[trafficMode]=AVERAGE

 

The result of the request above will look like this:

{
  "distance": 6483,
  "travelTime": 511,
  "violated": false,
  "events": [{
      "latitude": 48.833287265,
      "longitude": 8.1075147383,
      "distanceFromStart": 2060,
      "travelTimeFromStart": 186,
      "countryCode": "FR",
      "utcOffset": 60,
      "border": {
        "countryCode": "FR"
      }
    }
  ]
}

 

  • Each route event in the chronologically ordered list contains some basic and some type-specific information.
  • Use the basic information such as type and coordinates for marking the event in a map.
  • Events with the same "travelTimeFromStart" are aggregated to one event which has all type-specific information.