【问题标题】:How to find the OSM tag information along the route obtained using Mapbox direction API如何查找使用 Mapbox 方向 API 获得的路线沿线的 OSM 标签信息
【发布时间】:2017-09-14 07:20:18
【问题描述】:

我正在使用 Mapbox Direction API 构建一个导航应用程序。

我想获取沿途的OSM标签信息。 标签信息,如限速、停车标志、交通信号、车道数、单向等

谁能帮帮我?

【问题讨论】:

    标签: openstreetmap mapbox mapbox-android


    【解决方案1】:

    如果您可以访问后端,则可以使用 OSM 的 Atlas 工具:

    示例:从纬度/经度使用Location,然后使用小边界框进行查询:

    long osmIdentifier;
    Location location;
    atlas.edgesIntersecting(location.bounds().expand(Distance.ONE_METER))
            .forEach(edge -> 
                {
                    if (edge.getOsmIdentifier() == osmIdentifier)
                    {
                        System.out.println(edge.getTags());
                    }
                });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-02-16
      • 2011-06-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多