Routing API: How to specificy side of road?

Here is a simple trip with 4 locations but locations are placed each side of the street (zig zag). I want to generate route that doesn’t go straight on the same road, but route to the correct side of the street.

https://api.tomtom.com/routing/1/calculateRoute/39.913841,32.905069:39.913267,32.905459:39.912633,32.906229:39.911705,32.906476:39.909956,32.906078/jsonrouteType=shortest&travelMode=truck

I couldn’t get similar result.
It always goes north-west, then U-turn or turn left in 474. Sokak

Are you sure that this line was created based on the response from Routing API?

Yes, I’m sure it’s the result generated from the TomTom Routing API.
But you are right, I forgot to mention the vehicleHeading = 180 was set while generating the line in image. Without it, it goes north-west.

Still, this is not related with the question I wanted to ask. This is a two way street without any dividers. The vehicle must go on the correct side of the road where POI is located.

I typed R. for Right and L. for Left points. After the 2.L. vehicle must take a turn at somewhere to go to the other side of the street for 3.R. then another turn for 4.L.

This is what I get from Google Maps, using side_of_road parameter

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            32.905,
            39.9138,
            0,
            1676221088
          ],
          [
            32.90467,
            39.91409,
            0,
            1676221088
          ],
          [
            32.90467,
            39.91409,
            0,
            1676221088
          ],
          [
            32.90375,
            39.91391,
            0,
            1676221088
          ],
          [
            32.90322,
            39.91381,
            0,
            1676221088
          ],
          [
            32.90322,
            39.91381,
            0,
            1676221088
          ],
          [
            32.90347,
            39.91313,
            0,
            1676221088
          ],
          [
            32.90347,
            39.91313,
            0,
            1676221088
          ],
          [
            32.90438,
            39.91331,
            0,
            1676221088
          ],
          [
            32.90454,
            39.91334,
            0,
            1676221088
          ],
          [
            32.90534,
            39.91348,
            0,
            1676221088
          ],
          [
            32.90534,
            39.91348,
            0,
            1676221088
          ],
          [
            32.90551,
            39.9133,
            0,
            1676221088
          ]
        ]
      },
      "properties": {
        "RouteID": "",
        "Name": "None_0 to None_1",
        "stroke": "#ed0202",
        "stroke-width": 10,
        "stroke-opacity": 1
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            32.90551,
            39.9133,
            0,
            1676221098
          ],
          [
            32.90579,
            39.91301,
            0,
            1676221098
          ],
          [
            32.90606,
            39.91271,
            0,
            1676221098
          ],
          [
            32.90621,
            39.91255,
            0,
            1676221098
          ],
          [
            32.90628,
            39.91245,
            0,
            1676221098
          ],
          [
            32.90633,
            39.91237,
            0,
            1676221098
          ],
          [
            32.90648,
            39.912,
            0,
            1676221098
          ],
          [
            32.90666,
            39.91153,
            0,
            1676221098
          ],
          [
            32.90696,
            39.91061,
            0,
            1676221098
          ],
          [
            32.90704,
            39.91044,
            0,
            1676221098
          ],
          [
            32.90702,
            39.91036,
            0,
            1676221098
          ],
          [
            32.90705,
            39.91019,
            0,
            1676221098
          ],
          [
            32.90706,
            39.91016,
            0,
            1676221098
          ],
          [
            32.90707,
            39.91014,
            0,
            1676221098
          ],
          [
            32.90707,
            39.91013,
            0,
            1676221098
          ],
          [
            32.90707,
            39.91012,
            0,
            1676221098
          ],
          [
            32.90707,
            39.91011,
            0,
            1676221098
          ],
          [
            32.90707,
            39.91008,
            0,
            1676221098
          ],
          [
            32.90707,
            39.91008,
            0,
            1676221098
          ],
          [
            32.90706,
            39.91008,
            0,
            1676221098
          ],
          [
            32.90705,
            39.91008,
            0,
            1676221098
          ],
          [
            32.90704,
            39.91008,
            0,
            1676221098
          ],
          [
            32.90703,
            39.91007,
            0,
            1676221098
          ],
          [
            32.90702,
            39.91007,
            0,
            1676221098
          ],
          [
            32.90701,
            39.91007,
            0,
            1676221098
          ],
          [
            32.90701,
            39.91006,
            0,
            1676221098
          ],
          [
            32.907,
            39.91006,
            0,
            1676221098
          ],
          [
            32.90699,
            39.91005,
            0,
            1676221098
          ],
          [
            32.90698,
            39.91004,
            0,
            1676221098
          ],
          [
            32.90698,
            39.91003,
            0,
            1676221098
          ],
          [
            32.90697,
            39.91003,
            0,
            1676221098
          ],
          [
            32.90697,
            39.91002,
            0,
            1676221098
          ],
          [
            32.90696,
            39.91001,
            0,
            1676221098
          ],
          [
            32.90696,
            39.91,
            0,
            1676221098
          ],
          [
            32.90696,
            39.90999,
            0,
            1676221098
          ],
          [
            32.90695,
            39.90998,
            0,
            1676221098
          ],
          [
            32.90695,
            39.90997,
            0,
            1676221098
          ],
          [
            32.90696,
            39.90997,
            0,
            1676221098
          ],
          [
            32.90696,
            39.90996,
            0,
            1676221098
          ],
          [
            32.90696,
            39.90995,
            0,
            1676221098
          ],
          [
            32.90696,
            39.90994,
            0,
            1676221098
          ],
          [
            32.90697,
            39.90994,
            0,
            1676221098
          ],
          [
            32.90697,
            39.90993,
            0,
            1676221098
          ],
          [
            32.90698,
            39.90993,
            0,
            1676221098
          ],
          [
            32.90699,
            39.90992,
            0,
            1676221098
          ],
          [
            32.90699,
            39.90991,
            0,
            1676221098
          ],
          [
            32.907,
            39.90991,
            0,
            1676221098
          ],
          [
            32.90701,
            39.9099,
            0,
            1676221098
          ],
          [
            32.90703,
            39.90989,
            0,
            1676221098
          ],
          [
            32.90704,
            39.90989,
            0,
            1676221098
          ],
          [
            32.90705,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90706,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90707,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90708,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90709,
            39.90988,
            0,
            1676221098
          ],
          [
            32.9071,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90711,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90712,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90713,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90714,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90715,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90716,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90717,
            39.90988,
            0,
            1676221098
          ],
          [
            32.90718,
            39.90989,
            0,
            1676221098
          ],
          [
            32.90719,
            39.90989,
            0,
            1676221098
          ],
          [
            32.9072,
            39.9099,
            0,
            1676221098
          ],
          [
            32.90721,
            39.9099,
            0,
            1676221098
          ],
          [
            32.90722,
            39.90991,
            0,
            1676221098
          ],
          [
            32.90723,
            39.90992,
            0,
            1676221098
          ],
          [
            32.90724,
            39.90992,
            0,
            1676221098
          ],
          [
            32.90724,
            39.90993,
            0,
            1676221098
          ],
          [
            32.90724,
            39.90994,
            0,
            1676221098
          ],
          [
            32.90724,
            39.90995,
            0,
            1676221098
          ],
          [
            32.90724,
            39.90996,
            0,
            1676221098
          ],
          [
            32.90724,
            39.90997,
            0,
            1676221098
          ],
          [
            32.90723,
            39.90998,
            0,
            1676221098
          ],
          [
            32.90723,
            39.90999,
            0,
            1676221098
          ],
          [
            32.90723,
            39.91,
            0,
            1676221098
          ],
          [
            32.90722,
            39.91001,
            0,
            1676221098
          ],
          [
            32.90722,
            39.91002,
            0,
            1676221098
          ],
          [
            32.90721,
            39.91003,
            0,
            1676221098
          ],
          [
            32.9072,
            39.91004,
            0,
            1676221098
          ],
          [
            32.90719,
            39.91009,
            0,
            1676221098
          ],
          [
            32.90718,
            39.91012,
            0,
            1676221098
          ],
          [
            32.90718,
            39.91013,
            0,
            1676221098
          ],
          [
            32.90717,
            39.91015,
            0,
            1676221098
          ],
          [
            32.90716,
            39.91018,
            0,
            1676221098
          ],
          [
            32.90713,
            39.91024,
            0,
            1676221098
          ],
          [
            32.90709,
            39.91037,
            0,
            1676221098
          ],
          [
            32.90704,
            39.91044,
            0,
            1676221098
          ],
          [
            32.90696,
            39.91061,
            0,
            1676221098
          ],
          [
            32.90666,
            39.91153,
            0,
            1676221098
          ],
          [
            32.90648,
            39.912,
            0,
            1676221098
          ],
          [
            32.90633,
            39.91237,
            0,
            1676221098
          ],
          [
            32.90628,
            39.91245,
            0,
            1676221098
          ],
          [
            32.90621,
            39.91255,
            0,
            1676221098
          ],
          [
            32.90617,
            39.9126,
            0,
            1676221098
          ]
        ]
      },
      "properties": {
        "RouteID": "",
        "Name": "None_1 to None_2",
        "stroke": "#ff00dd",
        "stroke-width": 10,
        "stroke-opacity": 1
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            32.90617,
            39.9126,
            0,
            1676221109
          ],
          [
            32.90606,
            39.91271,
            0,
            1676221109
          ],
          [
            32.90579,
            39.91301,
            0,
            1676221109
          ],
          [
            32.90534,
            39.91348,
            0,
            1676221109
          ],
          [
            32.90534,
            39.91348,
            0,
            1676221109
          ],
          [
            32.90454,
            39.91334,
            0,
            1676221109
          ],
          [
            32.90454,
            39.91334,
            0,
            1676221109
          ],
          [
            32.90468,
            39.91316,
            0,
            1676221109
          ],
          [
            32.90475,
            39.91305,
            0,
            1676221109
          ],
          [
            32.90481,
            39.91293,
            0,
            1676221109
          ],
          [
            32.90483,
            39.91283,
            0,
            1676221109
          ],
          [
            32.90483,
            39.91275,
            0,
            1676221109
          ],
          [
            32.90482,
            39.91268,
            0,
            1676221109
          ],
          [
            32.9048,
            39.9125,
            0,
            1676221109
          ],
          [
            32.9048,
            39.9125,
            0,
            1676221109
          ],
          [
            32.90527,
            39.91249,
            0,
            1676221109
          ],
          [
            32.90542,
            39.91248,
            0,
            1676221109
          ],
          [
            32.90583,
            39.91251,
            0,
            1676221109
          ],
          [
            32.90621,
            39.91255,
            0,
            1676221109
          ],
          [
            32.90621,
            39.91255,
            0,
            1676221109
          ],
          [
            32.90628,
            39.91245,
            0,
            1676221109
          ],
          [
            32.90633,
            39.91237,
            0,
            1676221109
          ],
          [
            32.90648,
            39.912,
            0,
            1676221109
          ],
          [
            32.90666,
            39.91153,
            0,
            1676221109
          ],
          [
            32.90671,
            39.91138,
            0,
            1676221109
          ]
        ]
      },
      "properties": {
        "RouteID": "",
        "Name": "None_2 to None_3",
        "stroke": "#ffffff",
        "stroke-width": 10,
        "stroke-opacity": 1
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            32.90671,
            39.91138,
            0,
            1676221125
          ],
          [
            32.90696,
            39.91061,
            0,
            1676221125
          ],
          [
            32.90704,
            39.91044,
            0,
            1676221125
          ],
          [
            32.90702,
            39.91036,
            0,
            1676221125
          ],
          [
            32.90705,
            39.91019,
            0,
            1676221125
          ],
          [
            32.90706,
            39.91016,
            0,
            1676221125
          ],
          [
            32.90707,
            39.91014,
            0,
            1676221125
          ],
          [
            32.90707,
            39.91013,
            0,
            1676221125
          ],
          [
            32.90707,
            39.91012,
            0,
            1676221125
          ],
          [
            32.90707,
            39.91011,
            0,
            1676221125
          ],
          [
            32.90707,
            39.91008,
            0,
            1676221125
          ],
          [
            32.90707,
            39.91008,
            0,
            1676221125
          ],
          [
            32.90706,
            39.91008,
            0,
            1676221125
          ],
          [
            32.90705,
            39.91008,
            0,
            1676221125
          ],
          [
            32.90704,
            39.91008,
            0,
            1676221125
          ],
          [
            32.90703,
            39.91007,
            0,
            1676221125
          ],
          [
            32.90702,
            39.91007,
            0,
            1676221125
          ],
          [
            32.90701,
            39.91007,
            0,
            1676221125
          ],
          [
            32.90701,
            39.91006,
            0,
            1676221125
          ],
          [
            32.907,
            39.91006,
            0,
            1676221125
          ],
          [
            32.90699,
            39.91005,
            0,
            1676221125
          ],
          [
            32.90698,
            39.91004,
            0,
            1676221125
          ],
          [
            32.90698,
            39.91003,
            0,
            1676221125
          ],
          [
            32.90697,
            39.91003,
            0,
            1676221125
          ],
          [
            32.90697,
            39.91002,
            0,
            1676221125
          ],
          [
            32.90696,
            39.91001,
            0,
            1676221125
          ],
          [
            32.90696,
            39.91,
            0,
            1676221125
          ],
          [
            32.90696,
            39.90999,
            0,
            1676221125
          ],
          [
            32.90695,
            39.90998,
            0,
            1676221125
          ],
          [
            32.90695,
            39.90997,
            0,
            1676221125
          ],
          [
            32.90696,
            39.90997,
            0,
            1676221125
          ],
          [
            32.90696,
            39.90996,
            0,
            1676221125
          ],
          [
            32.90696,
            39.90995,
            0,
            1676221125
          ],
          [
            32.90696,
            39.90994,
            0,
            1676221125
          ],
          [
            32.90697,
            39.90994,
            0,
            1676221125
          ],
          [
            32.90697,
            39.90993,
            0,
            1676221125
          ],
          [
            32.90698,
            39.90993,
            0,
            1676221125
          ],
          [
            32.90699,
            39.90992,
            0,
            1676221125
          ],
          [
            32.90699,
            39.90991,
            0,
            1676221125
          ],
          [
            32.907,
            39.90991,
            0,
            1676221125
          ],
          [
            32.90701,
            39.9099,
            0,
            1676221125
          ],
          [
            32.90703,
            39.90989,
            0,
            1676221125
          ],
          [
            32.90704,
            39.90989,
            0,
            1676221125
          ],
          [
            32.90705,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90706,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90707,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90708,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90709,
            39.90988,
            0,
            1676221125
          ],
          [
            32.9071,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90711,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90712,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90713,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90714,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90715,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90716,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90717,
            39.90988,
            0,
            1676221125
          ],
          [
            32.90718,
            39.90989,
            0,
            1676221125
          ],
          [
            32.90719,
            39.90989,
            0,
            1676221125
          ],
          [
            32.9072,
            39.9099,
            0,
            1676221125
          ],
          [
            32.90721,
            39.9099,
            0,
            1676221125
          ],
          [
            32.90722,
            39.90991,
            0,
            1676221125
          ],
          [
            32.90723,
            39.90992,
            0,
            1676221125
          ],
          [
            32.90724,
            39.90992,
            0,
            1676221125
          ],
          [
            32.90724,
            39.90993,
            0,
            1676221125
          ],
          [
            32.90724,
            39.90994,
            0,
            1676221125
          ],
          [
            32.90724,
            39.90995,
            0,
            1676221125
          ],
          [
            32.90724,
            39.90996,
            0,
            1676221125
          ],
          [
            32.90724,
            39.90997,
            0,
            1676221125
          ],
          [
            32.90723,
            39.90998,
            0,
            1676221125
          ],
          [
            32.90723,
            39.90999,
            0,
            1676221125
          ],
          [
            32.90723,
            39.91,
            0,
            1676221125
          ],
          [
            32.90722,
            39.91001,
            0,
            1676221125
          ],
          [
            32.90722,
            39.91002,
            0,
            1676221125
          ],
          [
            32.90721,
            39.91003,
            0,
            1676221125
          ],
          [
            32.9072,
            39.91004,
            0,
            1676221125
          ],
          [
            32.90719,
            39.91009,
            0,
            1676221125
          ],
          [
            32.90718,
            39.91012,
            0,
            1676221125
          ],
          [
            32.90718,
            39.91013,
            0,
            1676221125
          ],
          [
            32.90717,
            39.91015,
            0,
            1676221125
          ],
          [
            32.90716,
            39.91018,
            0,
            1676221125
          ],
          [
            32.90713,
            39.91024,
            0,
            1676221125
          ],
          [
            32.90709,
            39.91037,
            0,
            1676221125
          ],
          [
            32.90704,
            39.91044,
            0,
            1676221125
          ],
          [
            32.90696,
            39.91061,
            0,
            1676221125
          ],
          [
            32.90666,
            39.91153,
            0,
            1676221125
          ],
          [
            32.90648,
            39.912,
            0,
            1676221125
          ],
          [
            32.90648,
            39.912,
            0,
            1676221125
          ],
          [
            32.90553,
            39.91191,
            0,
            1676221125
          ],
          [
            32.90553,
            39.91191,
            0,
            1676221125
          ],
          [
            32.90553,
            39.91155,
            0,
            1676221125
          ],
          [
            32.90553,
            39.91135,
            0,
            1676221125
          ],
          [
            32.90553,
            39.91123,
            0,
            1676221125
          ],
          [
            32.90551,
            39.91085,
            0,
            1676221125
          ],
          [
            32.90549,
            39.91072,
            0,
            1676221125
          ],
          [
            32.90549,
            39.91072,
            0,
            1676221125
          ],
          [
            32.90572,
            39.91066,
            0,
            1676221125
          ],
          [
            32.90579,
            39.91063,
            0,
            1676221125
          ],
          [
            32.90587,
            39.91059,
            0,
            1676221125
          ],
          [
            32.90625,
            39.91036,
            0,
            1676221125
          ],
          [
            32.90642,
            39.91026,
            0,
            1676221125
          ],
          [
            32.90648,
            39.9102,
            0,
            1676221125
          ],
          [
            32.90666,
            39.91008,
            0,
            1676221125
          ],
          [
            32.90672,
            39.91004,
            0,
            1676221125
          ],
          [
            32.90675,
            39.91002,
            0,
            1676221125
          ],
          [
            32.90681,
            39.90999,
            0,
            1676221125
          ],
          [
            32.90681,
            39.90999,
            0,
            1676221125
          ],
          [
            32.90676,
            39.90996,
            0,
            1676221125
          ],
          [
            32.9067,
            39.90995,
            0,
            1676221125
          ],
          [
            32.90662,
            39.90994,
            0,
            1676221125
          ],
          [
            32.9064,
            39.90993,
            0,
            1676221125
          ],
          [
            32.90637,
            39.90993,
            0,
            1676221125
          ],
          [
            32.90608,
            39.90994,
            0,
            1676221125
          ]
        ]
      },
      "properties": {
        "RouteID": "",
        "Name": "None_3 to None_4",
        "stroke": "#c4c700",
        "stroke-width": 5,
        "stroke-opacity": 1
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          32.905069,
          39.913841
        ]
      },
      "properties": {
        "RouteID": "",
        "SPID": "SP.None_0",
        "Name": null,
        "Arrive": 1676221088,
        "Departure": 1676221088,
        "Sequence": 0
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          32.905459,
          39.913267
        ]
      },
      "properties": {
        "RouteID": "",
        "SPID": "SP.None_1",
        "Name": null,
        "Arrive": 1676221098,
        "Departure": 1676221098,
        "Sequence": 1
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          32.906229,
          39.912633
        ]
      },
      "properties": {
        "RouteID": "",
        "SPID": "SP.None_2",
        "Name": null,
        "Arrive": 1676221109,
        "Departure": 1676221109,
        "Sequence": 2
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          32.90662,
          39.911358
        ]
      },
      "properties": {
        "RouteID": "",
        "SPID": "SP.None_3",
        "Name": null,
        "Arrive": 1676221125,
        "Departure": 1676221125,
        "Sequence": 3
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          32.906078,
          39.909956
        ]
      },
      "properties": {
        "RouteID": "",
        "SPID": "SP.None_4",
        "Name": null,
        "Arrive": 1676221186,
        "Departure": 1676221186,
        "Sequence": 4
      }
    }
  ]
}

OK, so currently we don’t have a solution for this.