문제

I want to get driving directions from source to destination from google maps. I written an app by following the below link.

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

But, finally i got GeoPoints only. How to convert them into directions like turn right, turn left , go straight 100mts. Is it possible to convert them or not ?? Is it correct method to get driving directions ?? or any other way to get directions ??

If anybody know these things please reply me.

Thanks

도움이 되었습니까?

해결책

As you got the complete direction details in this already given that instruction i.e. called legs step. Try to get the value of node and description from the

<name>Head west</name>
<description>
    <![CDATA[go 250&#160;m]]>
</description>

this will given that step by step detail in each every node. Store this value as string in list array also you can get the direction symbol from the those node

<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>

hope you got solution

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top