Hi i am using goole map API for my application to get the path drawn for my app. But the issues is when i call the following API http://maps.googleapis.com/maps/api/directions/json?origin=Chicago&destination开发者_StackOverflow中文版=158%20Waterston%20Avenue,%20Wolliston,%20MA,%2002170,%20&waypoints=optimize:true%7C134%20Wimbleton%20Drive,%20Longmeadow,%20MA,%2001106,%20%7C&sensor=false&mode=driving
The path drawn as per the value in "points" tag (here we get instruction to path to follow as well as latitude and langitude) from the above API call is as below
Here my current location i am passing is chicago as my current location. I am drawing the path with mkpolyline function with the lat lon i get from "points" key .I dont whats the issue there .
Ya after putting some effort i found that we need to pass the parameter avoid = highway , bydefault if we do not pass anything it takes up avoid = tolls so this was the issue i was facinf , later passing avoid = highway gave me the output i needed.
精彩评论