English 中文(简体)
如何在谷歌地图上两个地方之间强调的路线上展示“土耳其左”的信息?
原标题:How to show "Turn left" "Turn right" messages on the route highlighted between two places on Google map?

我正在开发一种应用,在这种应用中,我需要展示一个信息,显示用户在谷歌地图上指明的一条路上的位置后,哪里要走。

该格罗特语提供大部分信息,如距离,在两个地点之间持续,但并没有提供关于方向的信息。

最佳回答

从全球研究中,你可以使用植被(一)获得全球研究中的每一步骤的GStep物体。

对于每个GStep来说,你可以打上标语。 和 “在A5099/Coronation St上打第1right或“At the Roundabout”,取3rd。 飞到A6/Garstang Rd, 至 Preston

为了将GStep与多线的特定垂直连接起来,通过所有GSteps扫描,然后用低于或等于特定垂直的PolylineIndex()扫描。 与此类似:

      var v = 66; // The vertex you are looking for

      var targetStep = route.getStep(0);
      for (var j=0; j<route.getNumSteps(); j++) {
        var step = route.getStep(j);
        if (step.getPolylineIndex() < v) targetStep = step;
      }
      GLog.writeHtml(targetStep.getDescriptionHtml());

由于结构细节随时间而变化,并且因路线国和东道国语言或当地不同而有所不同,因此,不许试图打上标语。

问题回答

暂无回答




相关问题
How to decide the current point reach on google map?

How to decide the current point reach on google map? I have a list of points (pickup points) of a route that I want to show in my google map with polyline. Now i have to get the current location of ...

Topographical or relief data in Map APIs

I was wondering if anyone knew of any map APIs that offer topographical or relief data? I ve had a quick look at Google and Bing APIs, but could find nothing there. Google allow you to view a map as ...

Using maps on Windows Mobile

I m experimenting with maps on different mobile platforms. Getting Google Maps to work on Android was easy, following this tutorial. Getting the same to work on Windows Mobile is a different matter. ...

Adding a custom icon to a google map

I need a hand adding a custom icon to some Google Maps javascript. Code below for your reference: function populateMap() { var map = new GMap2(document.getElementById("map")); map.setCenter(new ...

RSS to KML Overlay

I m want to display my blog as a Google Map overlay (each post contains geotags). How can I dynamically create a KML overlay from an RSS? Or better, how can I create a loop (PHP) that would display ...

开放街道地图管理员

我需要开放Street的标记管理员。 地图,如山角地图。

热门标签