【发布时间】:2018-03-11 02:37:27
【问题描述】:
我有 google Maps API 方向 json 对象:
我想在用户到达某个位置时显示来自“步骤”jsonArray 的说明。 在“STEPS”JsonArray 内部,有一个 startLocation 和 endLocation 对象。
我知道如何获取当前位置的纬度和经度以及路线的 JSONData。 我想检查我当前的位置是否与“Steps”中的 startLocation 匹配。
从“Steps”JSONArray 中显示所有相应的指令(json 对象,例如持续时间、距离)。
但我不知道是否将我当前的位置与 StartLocation 或 endLocation 进行比较。
那么我应该将我的 currentLocation 与什么进行比较?
- 起始位置
- 结束位置
【问题讨论】:
标签: arrays json google-maps google-maps-api-3 google-directions-api