避免区域在路由V8 REST API中不起作用 [英] Avoid Areas not working in Routing V8 REST API

查看:53
本文介绍了避免区域在路由V8 REST API中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找不到解决方案,所以解决了.在询问路线指示时,我尝试避开特定区域.我已经对v7和v8进行了测试.v7可以完美运行并避开该区域,但v8却不能.我输入了相同的参数(纬度和经度),但无法正常工作,有人遇到此错误吗?

Couldn't find a solution so here it goes. I'm trying to avoid a specific area when asking for routing directions. I've made test with both v7 and v8. The v7 works perfectly and avoids the zone but the v8 doesn't. I entered the same parameters (lat and lon) and is not working, does anyone has this error?

我知道在文档中对它的管理方式有所不同,但是它仍然不适用于v8:/

I know is managed differently in the docs but it stills doesn't work for v8 :/

V7 --> avoidareas=19.352167,-99.196818;19.351126,-99.194004

V8 --> avoid[areas]=bbox:19.352167,-99.196818,19.351126,-99.194004

我在邮递员中使用的内容

我正在寻找拉丁美洲的坐标,不知道V8中是否存在某些位置限制:/尽管它在v7中有效

I'm looking for coordinates in Latin America, I don't know if the are some location limits in V8 :/ It works in v7 though

谢谢

推荐答案

对于可能会丢失的任何人,解决方案是在整个API中首先处理纬度,然后处理经度(这适用于起点和终点)

To anyone that might be lost, the solution is that throughout the API the coordinates are handled latitude first and then longitude (this applies to both origin and destination)

原点=(纬度),(经度)目的地=(纬度),(经度)

origin = (latitude) , (longitude) destination = (latitude), (longitude)

然而,避免区域却是另一种方式.

However for avoiding areas is the other way around.

如果要像西南角和东北角那样映射框,则将是这样的:

If you were to map the box like the south west corner and the north east corner it would be something like this:

避免[区域] =(经度sw),(纬度sw),(经度ne),(纬度ne)

avoid[areas] = (longitude sw),(latitude sw),(longitude ne),(latitude ne)

我的错误是我没有详细查看API参考,并假设存在处理坐标的标准.我的坏人:(

My error was that I didn't look at the API reference with detail and assumed that there was a standard on handling coordinates. My bad :(

这篇关于避免区域在路由V8 REST API中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆