Webportal v2

embedded apps

API Reference - navigation.recentDestinations

Required Privacy: Always available
Operations:

This API allows to retrieve recent destinations within the navigation system.

Input Parameter
Param name Description Type Unit/Values Example Required
locationAttributes

Location attributes to output in response.

Array of strings

- address

- coordinates

- mapMatchedCoordinates
['address', 'coordinates', 'mapMatchedCoordinates'] true
Output Data
Data name Description Type Unit/Values Example
name

Name of this recent destination.

string

n/a

address

Address of this recent destination.

Object

n/a

coordinates

Coordinates of this recent destination.

string

/
coordinates
 .longitude

Next maneuver longitude.

number

8.74301
coordinates
 .latitude

Next maneuver latitude.

number

8.74301
coordinates
 .altitude

Next maneuver altitude.

number

8.74301
mapMatchedCoordinates

Map matched coordinates of this recent destination.

Object

/
mapMatchedCoordinates
 .longitude

Next maneuver longitude.

number

8.74301
mapMatchedCoordinates
 .latitude

Next maneuver latitude.

number

8.74301
mapMatchedCoordinates
 .altitude

Next maneuver altitude.

number

8.74301
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
webportal.get(
    /* api name */
    "navigation.recentDestinations",
    /* parameters */
    "['address', 'coordinates', 'mapMatchedCoordinates']"
  )
  /* callback for `REPLY` messages */
  .then((message) => {
    if (message.status === 200) {
      /* handle `REPLY` success */
    }
    else { /* handle `REPLY` error */ }
  })
1
2
3
4
5
6
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0", 
  "type": "GET", 
  "api": "navigation.recentDestinations",
  "params": "['address', 'coordinates', 'mapMatchedCoordinates']"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// --- format of the `REPLY` message ---

{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "api": "navigation.recentDestinations",
  "status": 200,
  "statusText": "OK", 
  "data": [
    {
      "name": "Kiran's Club",
      "address": {
        /* Address */
        },
      "coordinates": {"latitude": 8.74301, "longitude": 8.74301}
      "mapMatchedCoordinates": {"latitude": 8.74301, "longitude": 8.74301}
    },
    {
      "name": "Vishal's Villa",
      "address": {
        /* Address */
        },
      "coordinates": {"latitude": 8.74301, "longitude": 8.74301}
      "mapMatchedCoordinates": {"latitude": 8.74301, "longitude": 8.74301}
    },
  ] 
}

false

This API allows to retrieve recent destinations within the navigation system.

Input Parameter
No input params
Output Data
Data name Description Type Unit/Values Example
action

Action performed on the recent destination triggering this event.

Enum of strings

- add

- remove
add
location

Location triggering this.

Object

/
location
 .name

Name of this recent destination.

string

location
 .address

Address of this recent destination.

Object

location
 .coordinates

Coordinates of this recent destination.

string

/
location
 .coordinates
  .longitude

Next maneuver longitude.

number

8.74301
location
 .coordinates
  .latitude

Next maneuver latitude.

number

8.74301
location
 .coordinates
  .altitude

Next maneuver altitude.

number

8.74301
location
 .mapMatchedCoordinates

Map matched coordinates of this recent destination.

Object

/
location
 .mapMatchedCoordinates
  .longitude

Next maneuver longitude.

number

8.74301
location
 .mapMatchedCoordinates
  .latitude

Next maneuver latitude.

number

8.74301
location
 .mapMatchedCoordinates
  .altitude

Next maneuver altitude.

number

8.74301
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
webportal.subscribe(
    /* api name */
    "navigation.recentDestinations",
    /* parameters */
     null,
    /* callback for `NOTIFY` messages */
    async (notifyMessage) => {
      if (notifyMessage.status === 200) {
        /* handle `NOTIFY` response */
      }
      else { /*  handle `NOTIFY` error  */ }
    }
  )
  /* callback for `REPLY` messages */
  .then((message) => {
    if (message.status === 200) {
      /* handle `REPLY` success */
    }
    else { /* handle `REPLY` error */ }
  })
1
2
3
4
5
6
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0", 
  "type": "SUBSCRIBE", 
  "api": "navigation.recentDestinations",
  "params":  null
}
1
2
3
4
5
6
7
8
9
10
11
// --- format of the `REPLY` message ---
// type: acknowledge the status of the subscription
// reception: only once after the subscription request
// contains outputed data: no
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "status": 200,
  "statusText": "OK"
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// --- format of the `NOTIFY` message ---
// type: event message about the subscription
// reception: each time the conditions of the subscription are met
// contains outputed data: yes
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "NOTIFY",
  "api": "navigation.recentDestinations",
  "status": 200,
  "statusText": "OK", 
  "data": {
    "action": "add"
    "location": {
        "name": "Kiran's Club",
        "address": {
          /* Address */
        },
        "coordinates": {"latitude": 8.74301, "longitude": 8.74301}
        "mapMatchedCoordinates": {"latitude": 8.74301, "longitude": 8.74301}
    }
  } 
}