2

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

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

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

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

谢谢

4

1 回答 1

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>

希望你有解决方案

于 2011-12-07T13:58:11.387 回答