Webportal v2

embedded apps

API Reference - navigation.launchGuidance

Required Privacy: Always available

This API allows to work with the navigation guidance feature of the infotainment system.

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

Navigation guidance status. Active or not.

boolean

n/a

true
Code Example
1
2
3
4
5
6
7
8
9
10
11
12
13
webportal.get(
    /* api name */
    "navigation.launchGuidance",
    /* parameters */
     null
  )
  /* 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.launchGuidance",
  "params":  null
}
1
2
3
4
5
6
7
8
9
10
// --- format of the `REPLY` message ---

{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "api": "navigation.launchGuidance",
  "status": 200,
  "statusText": "OK", 
  "data": true
}

false

This API allows to work with the navigation guidance feature of the infotainment system.

'waypoints' is an array so you can pass multiple waypoints to create complex navigations. The final destination can be 'locationType': 'coordinates' or 'locationType': 'address' but the waypoints must be only 'locationType': 'coordinates'. Max 9 entries in the array.
*Status code stopGuidance: 200 = guidance stopped ; 304 = No active guidance, nothing to stop ; 500
503 = Failure to stop guidance*
Input Parameter
Param name Description Type Unit/Values Example Required
action

Type of guidance action.

Enum of strings

- startGuidance

- stopGuidance
startGuidance true
navRequestId

ID of the request, this field must be send if 'action': 'startGuidance', also in Subscribe.

int

n/a

42 false
waypoints[n]
 .locationType

Type of location sent, this field must be send if 'action': 'startGuidance'.

Enum of strings

- address

- coordinates
address false
waypoints[n]
 .number

Destintion adress street number, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

16 false
waypoints[n]
 .street

Destintion adress street name, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

5th avenue false
waypoints[n]
 .crossingStreet

Destintion adress crossing street name, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

Roosvelt Road false
waypoints[n]
 .cityBlock

Destintion adress city block number, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

42 false
waypoints[n]
 .cityDistrict

Destintion adress city district name, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

Manhattan false
waypoints[n]
 .cityName

Destintion adress city name, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

New York false
waypoints[n]
 .postalCode

Destintion adress postal code, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

10001 false
waypoints[n]
 .prefecture

Destintion adress prefecture name, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

Prefecture Name false
waypoints[n]
 .stateCode

Destintion adress stateCode, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

US-NY false
waypoints[n]
 .stateName

Destintion adress state name, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

New York false
waypoints[n]
 .countryCode

Destintion adress country code, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

ISO 3166-1 alpha-3”

USA false
waypoints[n]
 .countryName

Destintion adress country name, this field must be send if 'action': 'startGuidance' & 'locationType': 'address'.

string

n/a

United State of America false
waypoints[n]
 .longitude

Longitude of the destination address, this field must be send if 'action': 'startGuidance' & 'locationType': 'waypoints'.

number

n/a

8.74301 false
waypoints[n]
 .latitude

Latitude of the destination address, this field must be send if 'action': 'startGuidance' & 'locationType': 'waypoints'.

number

n/a

8.74301 false
Output Data
No outputted data
Code Example
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
28
29
30
31
webportal.set(
    /* api name */
    "navigation.launchGuidance",
    /* parameters */
     { 
      "action": "startGuidance",
      "navRequestId": 42,
      "waypoints[n].locationType": "address",
      "waypoints[n].number": "16",
      "waypoints[n].street": "5th avenue",
      "waypoints[n].crossingStreet": "Roosvelt Road",
      "waypoints[n].cityBlock": "42",
      "waypoints[n].cityDistrict": "Manhattan",
      "waypoints[n].cityName": "New York",
      "waypoints[n].postalCode": "10001",
      "waypoints[n].prefecture": "Prefecture Name",
      "waypoints[n].stateCode": "US-NY",
      "waypoints[n].stateName": "New York",
      "waypoints[n].countryCode": "USA",
      "waypoints[n].countryName": "United State of America",
      "waypoints[n].longitude": 8.74301,
      "waypoints[n].latitude": 8.74301
        }
  )
  /* callback for `REPLY` messages */
  .then((message) => {
    if (message.status === 200) {
      /* handle `REPLY` success */
    }
    else { /* handle `REPLY` error */ }
  })
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0", 
  "type": "SET", 
  "api": "navigation.launchGuidance",
  "params":  { 
    "action": "startGuidance",
    "navRequestId": 42,
    "waypoints[n].locationType": "address",
    "waypoints[n].number": "16",
    "waypoints[n].street": "5th avenue",
    "waypoints[n].crossingStreet": "Roosvelt Road",
    "waypoints[n].cityBlock": "42",
    "waypoints[n].cityDistrict": "Manhattan",
    "waypoints[n].cityName": "New York",
    "waypoints[n].postalCode": "10001",
    "waypoints[n].prefecture": "Prefecture Name",
    "waypoints[n].stateCode": "US-NY",
    "waypoints[n].stateName": "New York",
    "waypoints[n].countryCode": "USA",
    "waypoints[n].countryName": "United State of America",
    "waypoints[n].longitude": 8.74301,
    "waypoints[n].latitude": 8.74301
  }
}
1
2
3
4
5
6
7
8
9
// --- format of the `REPLY` message ---

{
  "id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
  "type": "REPLY",
  "api": "navigation.launchGuidance",
  "status": 200,
  "statusText": "OK"
}

false

This API allows to work with the navigation guidance feature of the infotainment system.

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

ID of the request, also in Set.

int

n/a

42
status

ID of the request, also in Set.

Enum of strings

- success

- failed

- aborted

- invalid_location

- invalid_argument

- valid_location
success
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.launchGuidance",
    /* 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.launchGuidance",
  "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
// --- 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.launchGuidance",
  "status": 200,
  "statusText": "OK", 
  "data":  { 
    "navRequestId": 42,
    "status": "success"
  } 
}