获取用于计算路线的LinkIdType [英] Obtaining LinkIdType for calculateroute

查看:31
本文介绍了获取用于计算路线的LinkIdType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试使用

您还可以使用legAttributes = links通过calculateroute获取路线的linkId列表.

calculateroute endpoint to avoid certain roads that I specify.

It accepts avoidLinks parameter in which a list LinkIdTypes can be specified which determines the network links to be avoided when calculating the route.

What I'm having trouble finding is how do I get those LinkIdTypes, does Here provide an endpoint to query them (specifiying lat & lng)? or perhaps an endpoint I can use to define my own which then gives me a LinkIdType which I can reuse for future calls?

tl;dr: Where do I get LinkIdTypes for a specific road?

Addendum: I am aware of avoidAreas but this seems too cumbersome to use since I have to specify a bounding box instead of a road segment.

解决方案

you can get linkId by doing a reverse geocode of a lat,lng.

Exemple of reverse geocode . LinkId is available in the field ReferenceId.

You can also get the list of linkId of your route with calculateroute using legAttributes=links.

Exemple of calculate route

这篇关于获取用于计算路线的LinkIdType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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