Google maps Direction by default gave us a route that has a mini distance, but for my case I want to draw a custom route is this possible with android google maps api v2 ?
example :
How can I do that in android google maps api v2 ?
P.S :
I already know how to draw route beetween two point but not a custom one just fellowing google directions.
I think you meant waypoint.
Look for waypoint in this link
https://developers.google.com/maps/documentation/directions/
Between your start and end point, you can set up to 8 waypoint for free which will draw a route that connect all of these point between start to finish
If its other kind of custom route you talk about then , I guess you will ended up having to find each route between 2 point at a time
Related
I have for example more than two points on streets in my app, how to draw route between them depending on streets?overview_polyline from Google Directions API working only with 2 points at the time?Is it possible to make Google Directions API one request with many points and get overview_polyline route?
Hope it help Google Maps Directions API
I'm about to learn more on how to draw route between two points using Google Directions in Google Map Android API V2. My question is can i get informations about the drawed road like witch streets are passed by this road .Or can i get this information without drawing the route ? can i get it with the two points only(start- end).
thanks.
something like this is that you need?
https://developers.google.com/maps/documentation/javascript/examples/directions-travel-modes?hl=es-419
after #honeyyy comment I suggest this link
https://developers.google.com/maps/documentation/javascript/examples/directions-complex?hl=es-419
that get all checkpoint in the middle of two points an get information about them
Hi friends iam making an android based app in which a user can see the multiple possible paths between two location points means source-to-destination is it possible in android?
Yes You can draw multiple path between 2 locations using Google Direction API
as :
http://maps.googleapis.com/maps/api/directions/json?origin=SourcePoint&destination=DestinationPoint&sensor=false&units=metric&alternatives=true
Here alternatives=true is property which gives multiple paths . If You set this property as false one route will be provided
You can also refer this https://developers.google.com/maps/documentation/directions/
and also these too : 1) How to Draw Route in Google Maps API V2 from my location
2) Answer : Draw path between two points using Google Maps Android API v2
I already searched on StackOverflow and Google. But i didn't find a real answer. I think there is just no DirectionsRenderer in the Android API. But can you acknowledge this?
If there is not DirectionsRenderer, how could i use the Android API to show a GoogleMaps and draw a Route on the Map?
I want to draw a nice route. Not just lines between the coordinates of each route-section which are also delivered from the Directions-Request.
I think there is just no DirectionsRenderer in the Android API. But can you acknowledge this?
There is no DirectionsRenderer in Maps V2. You can tell this by reading the documentation.
how could i use the Android API to show a GoogleMaps and draw a Route on the Map?
There is nothing in Maps V2 to support this.
I want to draw a nice route. Not just lines between the coordinates of each route-section which are also delivered from the Directions-Request.
You will need to find some Web service that will serve up coordinate information for the route with sufficient granularity (e.g., every 10m) to give you your "nice route", then use a Polyline or something like that for actually rendering the route.
SO i found out that it is possible to just take the legs, then the steps and within the steps you will find the "points".. when you decode the points string its a very detailed list of all coordinates.
with this coordinates, you can easily draw a nice route on the map.
so it's possible without the need of a additional Web-API.
Can i get direction between 2 points with using Google Maps v2 in my Android application ?
I found Polyline but i don't want to draw a line between 2 points.
I found a solution which is using Intent. It can solve this problem but it is not useful because this solution is starting another map application and I want to show direction in my application. Can i do this ?
You cannot get directions using just the Google Maps V2 api. You should use the Google Directions API direction request call. This will return the raw direction data in json which would allow you to draw a Polyline for the directions on the map or show the data in any format you would like.
There isn't any method to do it because it envolves several computing that must be done in Google Maps servers (and they don't allow you to do so many without paying if you hold a business).
So, the only way is making a petition to google maps servers as they describe in the Google Maps Api documentation that #Bobbake4 linked. Then, you'll receive several coordinates that you'll use to draw a polyline which represents your route.
Hopefully, someone has already coded everything and shared gently with us here https://stackoverflow.com/a/15643705/1516973
That's absolutely the best answer covering Android Google Maps routing that I've found in Stack Overflow, so thanks to #Akexorcist and #emil-adz for it.