4.7导航功能

<br/><p>导航功能则包括出发点、途经点、终点的设置,以及路线规划、路线切换、导航中询问路况等功能,其对应的处理器是NaviProcessor。回复指令内容如下: * 以发起导航的任务流为例: ~~~ 输入:导航去白云山 输出: { "actions": [ { "action": "VIEW", "target": { "data": [ "白云山(山坡的山)", "白云尚(高尚的尚)" ], "id": 310, "label": "请选择一个地点", "type": "SINGLE" } } ], "outc": "1", "rtext": "我找到了2个同音的地点,第1个,白云山(山坡的山),第2个,白云尚(高尚的尚)。请选择一个地点", "synthetise": "", "ttext": "第一个/第二个" } 语义解析:以单项(type="SINGLE")对话框(id=310)的形式展示(action="VIEW")同音选点。 输入:第一个 输出: { "actions": [ { "action": "SELECT", "target": { "city": "广州市", "detailedaddress": "广园中路801号", "id": 325, "latitude": 23.186097, "longitude": 113.304073, "name": "白云山", "recyle": 0, "streetid": "550fd5f9e7230b04921fc9b2", "uid": "550fd5f9e7230b04921fc9b2" } }, ... ], "outc": "1", "rtext": "我找到了9个相关地点,第一个是白云山(广园中路801号)。你要去第几个呢?", "synthetise": "", "ttext": "第一个/第二个" } 语义解析:在多个相关地点(id=325)中选择(action="SELECT")一个作为终点。 输入:第一个 输出: { "actions": [ { "action": "QUERY", "target": { "endaddress": { "city": "广州市", "detailedaddress": "广园中路801号", "id": 325, "latitude": 23.186097, "longitude": 113.304073, "name": "白云山", "recyle": 0, "streetid": "550fd5f9e7230b04921fc9b2", "uid": "550fd5f9e7230b04921fc9b2" }, "id": 324, "recyle": 0, "type": "DRIVELIEN" } } ], "outc": "1", "rtext": "已为你规划路线,如需要其他路线请告诉我", "synthetise": "", "ttext": "" } 语义解析:查询(action="QUERY")终点为endaddress的驾车(type="DRIVELIEN")导航的路线(id=324)。 输入:开始导航 输出: { "actions": [ { "action": "SET", "target": { "id": 323, "status": "CONTINUE" } } ], "outc": "0", "rtext": "导航继续", "synthetise": "", "ttext": "" } 语义解析:开始/继续(status="CONTINUE")导航(id=323)。 ~~~ * 页面效果图: ![图片.png](https://cos.easydoc.net/72919679/files/kahkqyy1.png)--![图片.png](https://cos.easydoc.net/72919679/files/kahkr8ep.png) ![图片.png](https://cos.easydoc.net/72919679/files/kahkrgc0.png)--![图片.png](https://cos.easydoc.net/72919679/files/kahkrjhz.png)