# Route to the correct side of street.

A taxi-driver would like to drop off the passenger "at the doorstep". This requires the route to go the correct side of the street. To arrive at the destination on the correct side-of-street, specify the sideOfStreetHint parameter for the destination in the request.

sideOfStreetHint accepts latitude, longitude as input. The value expected to be used for this, normally, is the position of the PoI (Point of Interest) beside the road. The resulting route will try to take this hint into account and route you to the correct side of the street.

## Example

curl -X GET \
'https://router.hereapi.com/v8/routes?origin=52.511985,13.240523&transportMode=car&destination=52.500541,13.363060;sideOfStreetHint=52.500541,13.363060&return=polyline,summary'

{
"routes": [
{
"id": "0c1fe0e2-6a70-42ea-a375-ccc7b23337e9",
"sections": [
{
"type": "vehicle",
"departure": {
"place": {
"type": "place",
"location": {
"lat": 52.5119889,
"lng": 13.2405185,
"elv": 0.0
},
"originalLocation": {
"lat": 52.5119849,
"lng": 13.240523
}
}
},
"arrival": {
"place": {
"type": "place",
"location": {
"lat": 52.5004381,
"lng": 13.3633611,
"elv": 0.0
},
"originalLocation": {
"lat": 52.5005409,
"lng": 13.3630599
}
}
},
"summary": {
"duration": 1385,
"length": 10784,
"baseDuration": 1150
},
"polyline": "BGqvilkDuskoZhDtH_JvCnL4DjNgF_EwC_EwCrO0FvHkDvMgFvoCsdjzC4hBvb0KrO0KkD4wB8BwgBoV0jLwCokB8B8foBoa0F49CoG0_CoLomF8BsdwCsiB8BsYoBkc8BoVU4NoBoVoBoV8BsiBwCsgCUoL4DsxBkDkwB8GguD0Fs-CsJw9EU4NUwMoBoQU0FoBoV8BgjBT8fnBgKnBsJ7B8L7BsJjD0K3D0KjD0KvC0KvCoV7BsTA4SwCsO4DgKgF8GoG0F8L0FkDsJ8B4I8BwM8BoVU0UwCkwBkDkrBoGg_CsE8iCwCs2BkDouB8BgeoBkXoBwWUkNkDwW4D03BU4N8B0eoB0UU8LoBsToBwRoB4NUkIUsOkD0tBkD41BkI8-DsJs1E8B4mB4NslHwCsd4D4_BoBsToBgUwH0uDA4DkDgtBoBkSUwHwC4hBU0KoGw8CkD8uB8BwbsE41BkDozBsE4kC8B4XgF0wCwCkhB4IgnEgFgrCsE8iC4Dk_BgF0wCgFgwCoGgpDoB8V0F4iD_EwCzFsE3DwH3DwHjDsJvCoLT8LA8GU4I8BsJ8BwHwCoGgF0KoLsT8GgKkDwHwCkI8BwMUwHUsJ8G49C8B8fwC8pBoBgPoB4X4D03BwCkhBwCgoB8BwgBUwMUoLU4NUkIoB4SkD4mBoB8VoB4SoBgUoBoVsEslCU0UUwWoBoaUkS8B8aoB0KwCgUsE8kBkD0yBwCsiBkI42DkIkxDoG87CoGg_CkI0uDU8GoBkXoB4SkD4rBoBgUUsJAwMnB0KjDoL_EoLzFgFjIsOjD8GjDwRTgKrE0F3D4D3DkDrEwCrE8BrEoBjI8BvR4DnVgFjwB8LrJwC7VgF3SgF_OsEjcwH_EoBvM8BvM8B3SgF3IkDzPsE3NkDzegKnkB4I_YoGvbgFnfsE7GoBzFU7GTzUrEjDAnGnBvHvC_EoG3D0FjD0F7BgF7BgFnBsEnB0FTsETgFT4I4No9BsEkS0FoVgK8pBsJ8kB0F4XwM0yB8BsJoBkIoBoLUwHAoQToLnB0KnBoGzF0UnGsTvH4XzF0UvHwbrJsnB3D8QjDgP7B0K7B0KjDgU7BgPnBsOTgPAkSU0PAsEoB8L8BwM8BwMwC8LkDwMsEoVwC4NoBwHoBsTwCkmBoBoaUoQUoVAsOToQ7BgZnBkST0U3NjI_EjD_JvHvM3I3NjNzPvRrTnV7QvR7GzF3DnB_EnB7QzPnGnG7Q7QnGzFzUvRj6BzyB7pBjmBrYzU_TvR_B5B",
"transport": {
"mode": "car"
}
}
]
}
]
}


## Screenshot

The below image shows two routes. One in purple is the route without the sideOfStreetHint parameter and the one in blue is the above example.

## Routing to side of street and street dividers

It is important to note that the option just discussed has the default behaviour of navigating to the desired street side only for those cases where crossing lanes is impossible or inconvenient, such as where a physical or legal divider is present between the opposite directions. Consider the following requests

## Example

curl -X GET \
'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5411320,13.4108499&destination=52.5391210,13.4081705;sideOfStreetHint=52.5389135,13.4079459;matchSideOfStreet=always&return=polyline,summary'

{
"routes":[
{
"sections":[
{
"id":"f4789fbb-5ea2-4183-809f-46884201a936",
"type":"vehicle",
"departure":{
"place":{
"type":"place",
"location":{
"lat":52.5411302,
"lng":13.4108494,
"elv":0.0
},
"originalLocation":{
"lat":52.541132,
"lng":13.4108499
}
}
},
"arrival":{
"place":{
"type":"place",
"location":{
"lat":52.5391076,
"lng":13.4081575,
"elv":0.0
},
"originalLocation":{
"lat":52.539121,
"lng":13.4081704
}
}
},
"summary":{
"duration":115,
"length":755,
"baseDuration":115
},
"polyline":"BG0s7mkDiixyZmHnqC2C7mBsB3MUrHW3KArJpB3K1CtT1EjYV1CrB1G1ChO1ElaT1ErBhGrJ9yB_D3ShK_4BhGgCrFqB_FsBU2GAsH1GkU3OylB5Wg7BhSouBnQ8sB",
"transport":{
"mode":"car"
}
}
]
}
]
}


The returned polyline is a route approaching the destination from the northwest, as we required the route to end on the southwest side of the street. If the sideOfStreetHint and matchSideOfStreet parameters were absent, the resulting (shorter) route would approach from the the southeast instead.

## Example

curl -X GET \
'https://router.hereapi.com/v8/routes?transportMode=car&origin=52.5411320,13.4108499&destination=52.5391210,13.4081705;sideOfStreetHint=52.5389135,13.4079459;matchSideOfStreet=onlyIfDivided&return=polyline,summary'

{
"routes":[
{
"id":"56cd515c-2c31-4f8a-b9b9-33ef07136721",
"sections":[
{
"id":"50eecb39-b0dd-40d0-8a05-4d6045f5bce3",
"type":"vehicle",
"departure":{
"place":{
"type":"place",
"location":{
"lat":52.5411302,
"lng":13.4108494,
"elv":0.0
},
"originalLocation":{
"lat":52.541132,
"lng":13.4108499
}
}
},
"arrival":{
"place":{
"type":"place",
"location":{
"lat":52.5391076,
"lng":13.4081575,
"elv":0.0
},
"originalLocation":{
"lat":52.539121,
"lng":13.4081704
}
}
},
"summary":{
"duration":80,
"length":513,
"baseDuration":80
},
"polyline":"BG0s7mkDiixyZb8I_B8a_B6gBtRThMtJhM1KhMtLhI1IrJtLlzC53C6O9sB4O9qBmD3I",
"transport":{
"mode":"car"
}
}
]
}
]
}


In this case, although the sideOfStreetHint is specified, we have also specified matchSideOfStreet=onlyIfDivided. Since the destination street has no physical divider, the returned route is the shorter one. In other words, the sideOfStreetHint is ignored.