开发者

Finding driving directions using Google Maps JavaScript API V3

Here is the scenario that i want take two addresses dynamically from user, consider one of them as source and other as destination and find driving 开发者_StackOverflowdirections between source and destination.

i googled and got some stuffs not familiar to me..such as writing script using Google Maps JavaScript API V3, and the direction out put will be in json or xml format...i have tried google.map.directionrenrender and directionservice api's in my code but it is saying no such classes in google.map..as i am new to scripting language i am not understanding how to start ....i am using eclipse ide, where i want to build an android app that takes addresses and gives driving directions between those two points..

i want the program almost similar to this Google map driving direction source code for their example? but here they have used some html code and why that is actually required..?

please help me in writing the code

Thanks in advance


To open up Google Maps with directions, start a new Intent using a URL like this:

http://maps.google.com/maps?saddr=%s&daddr=%s

Replace each %s with a string like "x,y" where x and y specify the latitude and longitude. If you want directions from the current location, leave the saddre parameter blank.

This won't work on phones that don't have Google Maps installed, and in those cases will open the browser.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜