在给定纬度和经度的情况下,如何从此处恢复速度限制? [英] How to retreive speed limit from here maps given a latitude and longitude?

查看:97
本文介绍了在给定纬度和经度的情况下,如何从此处恢复速度限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从Here API映射中获取速度限制,但是我找不到解决方法.我在网站上尝试了一些示例,但是唯一可行的示例是要求路线起点和终点的示例.

I'm trying to get speed limit from Here API maps but I can't find the way to do it. I tryed few example on web site but the only one that works is the one which require point of start and point of stop of the route.

我想只给定一个点(或一个盒子)的速度限制.我必须使用哪个API?有例子吗?

I would like to get the speed limit given only one point ( or a box ). Which api do I have to use? Is there an example?

https://route.cit.api.here.com/routing/7.2/calculateroute.json?jsonAttributes=1&waypoint0=51.31854,9.51183&waypoint1=50.11208,8.68342&departure=2019-01-18T10:33 :00& routeattributes = sh,lg& legattributes = li& linkattributes = nl,fc& mode = fastest; car; traffic:enabled& app_code = appcode& app_id = appid

这是一个航路点,但不是我想要的东西,我只想通过纬度/经度.

This is the waypoint one but is not what I'm looking for, I would like to pass it only a Latitude / Longitude.

谢谢

推荐答案

您可以使用PDE API(平台数据扩展)

You can achieve this by using PDE API(Platform Data Extension)

  1. 您必须首先将地理坐标(纬度,经度)映射到给定坐标及其所在的功能类(FC1-5)的可导航位置(纬度,经度).这可以通过简单的地理编码器实现请求
  2. 您可以根据可导航的纬度,经度计算出tilexy值,并将其传递给PDE API,以查询该特定FC类上的限速层.

查看 https://tcs.ext.here.com/examples/v3 /link_speed_locator 示例,涵盖了这个确切的用例.

Look at https://tcs.ext.here.com/examples/v3/link_speed_locator example which covers this exact usecase.

以下是一个示例地址解析器请求.这里的prox参数是您的纬度,经度

Below is a sample geocoder request. Here prox parameter is your lat,long

https://reverse.geocoder.cit.api.here.com/6.2/reversegeocode.json?app_id=xxxx&app_code=yyyy&prox=50.133848, 8.715332,500&mode=retrieveAddresses&maxResults=1&additionaldata=SuppressStreetType,Unnamed&locationattributes=linkInfo

以下是pde请求示例

https://pde.cit.api.here.com/1/tiles.json?layers=SPEED_LIMITS_VAR_FC1,SPEED_LIMITS_VAR_FC2,SPEED_LIMITS_VAR_FC3,SPEED_LIMITS_VAR_FC4,SPEED_LIMITS_VAR_FC5,ROAD_GEOM_FC1,ROAD_GEOM_FC2,ROAD_GEOM_FC3,ROAD_GEOM_FC4,ROAD_GEOM_FC5&levels=9,10,11,12,13,9,10,11,12,13&tilexy=536,398,1073,797,2147,1594,4294,3188,8588,6377,536,398,1073,797,2147,1594,4294,3188,8588,6377&app_id=xxxx&app_code=yyyy

在开发者网站上了解有关此内容的更多信息-

Read more about it in the developer site - https://developer.here.com/documentation/platform-data/topics/quick-start-view-map-data.html

希望您觉得这有用!

这篇关于在给定纬度和经度的情况下,如何从此处恢复速度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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