{"id":2587,"date":"2023-12-22T21:17:13","date_gmt":"2023-12-22T21:17:13","guid":{"rendered":"https:\/\/developers.maplink.global\/using-the-restriction-area\/"},"modified":"2024-02-29T17:29:51","modified_gmt":"2024-02-29T17:29:51","slug":"using-the-restriction-area","status":"publish","type":"post","link":"https:\/\/developers.maplink.global\/en\/using-the-restriction-area\/","title":{"rendered":"Using the restriction zone"},"content":{"rendered":"\n<p> Restricted zones can be used with the <strong><a href=\"https:\/\/developers.maplink.global\/en\/building-requests-for-the-trip-api\/\" data-type=\"post\" data-id=\"1074\">Trip<\/a>, <a href=\"https:\/\/developers.maplink.global\/en\/building-requests-for-the-planning-api\/\" data-type=\"post\" data-id=\"1013\">Planning<\/a> and <a href=\"https:\/\/developers.maplink.global\/construindo-requisicoes-para-a-distance-matrix-api\/\" data-type=\"post\" data-id=\"1197\">Distance Matrix<\/a><\/strong> APIs.<\/p>\n\n<p>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 <code>restrictionZones<\/code>:<\/p>\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{\n    \"calculationMode\": \"THE_SHORTEST\",\n    \"points\": [\n        {\n            \"latitude\": -23.337132,\n            \"longitude\": -46.835427,\n            \"siteId\": \"Cajamar\"\n        },\n        {\n            \"latitude\": -23.682211,\n            \"longitude\": -46.546867,\n            \"siteId\": \"SantoAndre\"\n        }\n    ],\n    \"restrictionZones\": [\n        \"RestritionZone1\"\n    ]\n}<\/pre>\n\n<p>The results of the routing, with and without the restricted area, can be seen in the maps below:<\/p>\n\n<h2 class=\"wp-block-heading\"><strong>Route with restricted area<\/strong><\/h2>\n\n<p class=\"has-text-align-center\"><strong><img loading=\"lazy\" decoding=\"async\" width=\"649\" height=\"646\" src=\"https:\/\/lh7-us.googleusercontent.com\/S6isM5TQcgOA2SmNj8QeS_WtUAEGhv4JFTjV24yo3keNGrwYLPUZAqFzXhWJ1eHN8g2r3dFWxk7Gpu9OgAw2zJJ44x4no23QjpdB3upMlO8veOp5OTjQV4z3os2K1h_JChr0OoXYO3Cp17zTZ4TzxYU\"\/><\/strong><\/p>\n\n<h2 class=\"wp-block-heading\"><strong>Route without restricted area<\/strong><\/h2>\n\n<p class=\"has-text-align-center\"><strong><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"642\" src=\"https:\/\/lh7-us.googleusercontent.com\/M7xD9M0icBY2zndicAMNbBdI2ctkGZxAFQocKGheONAYchDFEtgr3GAb5ZtCKDaiVdGqlpAdSVLruoxDVfei1Aee6zyiQUsNZBf1OmmGGlDWNt7_c1WUBJ0W-GdlLUHPOLl6QNAWHFPc9IvjXeNkE98\"\/><\/strong><\/p>\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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: The results of the routing, with and without [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[162],"tags":[],"class_list":["post-2587","post","type-post","status-publish","format-standard","hentry","category-restriction-zone-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/comments?post=2587"}],"version-history":[{"count":3,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2587\/revisions"}],"predecessor-version":[{"id":2604,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/posts\/2587\/revisions\/2604"}],"wp:attachment":[{"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/media?parent=2587"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/categories?post=2587"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.maplink.global\/en\/wp-json\/wp\/v2\/tags?post=2587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}