Using the restriction zone
Restricted zones can be used with the Trip, Planning and Distance Matrix APIs.
In this example we will make a request to the Trip API considering the restriction zone created in the previous examples. The name of the restriction zone must be entered in the parameter restrictionZones:
{
"calculationMode": "THE_SHORTEST",
"points": [
{
"latitude": -23.337132,
"longitude": -46.835427,
"siteId": "Cajamar"
},
{
"latitude": -23.682211,
"longitude": -46.546867,
"siteId": "SantoAndre"
}
],
"restrictionZones": [
"RestritionZone1"
]
}
The results of the routing, with and without the restricted area, can be seen in the maps below: