【问题标题】:How to get driving direction data from geo points?如何从地理点获取行车方向数据?
【发布时间】:2011-12-07 13:36:10
【问题描述】:

我想从谷歌地图获取从源头到目的地的行车路线。我通过以下链接编写了一个应用程序。

http://about-android.blogspot.com/2010/03/sample-google-map-driving-direction.html

但是,最后我只得到了 GeoPoints。如何将它们转换为右转、左转、直行 100 米等方向。是否可以转换它们?获取行车路线的方法是否正确?或任何其他方式获取路线??

如果有人知道这些事情请回复我。

谢谢

【问题讨论】:

    标签: android google-maps driving-directions


    【解决方案1】:

    因为您已经给出了该指令,即称为腿步,所以您已经获得了完整的方向详细信息。尝试从

    中获取节点和描述的值
    <name>Head west</name>
    <description>
        <![CDATA[go 250&#160;m]]>
    </description>
    

    这将在每个节点中逐步详细说明。将此值作为字符串存储在列表数组中,您也可以从这些节点获取方向符号

    <IconStyle>
          <scale>1.300000</scale>
          <Icon>
               <href>http://maps.gstatic.com/intl/en_ALL/mapfiles/kml/paddle/go.png</href>
          </Icon>
          <hotSpot x="0.500000" y="0.000000" xunits="fraction" yunits="fraction"/>
     </IconStyle>
     <ListStyle>
           <ItemIcon>
                 <href>http://maps.gstatic.com/intl/en_ALL/mapfiles/kml/paddle/go-lv.png</href>
            </ItemIcon>
       </ListStyle>
    

    希望你有解决办法

    【讨论】:

    • 感谢您的回答。您能否发送有关行车路线的任何有用链接。
    猜你喜欢
    • 2020-03-03
    • 2012-02-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多