objective-c - 谷歌地图 - 在路上的大概位置

标签 objective-c google-maps routes

我有一个项目,我需要跟踪道路上的汽车,我有下面的道路,我需要为车辆放置一个标记。我在车上安装了一个 GPS 设备,我从设备中获取坐标,GPS 设备定位精度不是很好(< 10M),我如何在 map 上绘制的道路上设置标记?

enter image description here

最佳答案

谷歌 Maps Tracks API提供面向车辆/ Assets 跟踪的功能。对于您的特定用例,您可以记录 crumbs (甚至指定测量精度!)来自您的数据源,然后 retrieve the collected crumbs snapped to the nearest road .

要仅获取当前位置,只需为minTimestampmaxTimestamp 选择一个合适的范围即可。如果您想完全避免存储历史记录,您应该能够重复使用固定的时间戳:

If a crumb's timestamp is the same as an already-existing crumb for the specified entity, the existing crumb will be overwritten with the new one. (see "Recording crumbs")

关于objective-c - 谷歌地图 - 在路上的大概位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22741596/

相关文章:

ios - 如何使用新数据刷新我的 UIViewController?

google-maps - Google Place Details API 中的语言不一致

java - Android - 计算每个缩放级别的 map 距离,例如 Gmaps 比例尺

asp.net-mvc - ASP.NET MVC 3 - 区域不工作

ruby-on-rails - Rails App Wicked 路由错误

objective-c - 模态表窗口未居中

ios - 如何在 Objective C 中解析 XML 文件

Objective-C:模偏差

python - 向 map 添加文本注释

javascript - 如何找到导致非自愿路由的代码段? (在旧网站中)