multiple routes between two point in Google map - android

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

Related

Getting data from drawed road using Google Map Android API V2

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

Draw Custom Route using Android Google maps v2

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

Google Map v2 Get Direction Android

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.

heatmap using android maps api v2

I am trying to build a heatmap using Google Maps for Android API v2. The intensity is based on the number of markers in the given area.
I have gone though http://code.google.com/p/mapex/ which is for API v1 and uses Overlays for generating the heatmap. I have modified the code partially to work for me via a View(I create my own custom heatmapview which extends view and in the draw(), I create those RadialGradient patterns).
I also found some basic info online that for API V2, we need to use TileOverlay and TileProvider, which I need help with. Seems like all the examples I see are getting the data through UrlTileProvider, which would not be feasible for me. I have a set of LatLng points with me and would like to use it only.
Can anyone give me some hint on how to proceed?
As of a few days ago, you can now use the Google Maps Android Heatmap Utility. From the link:
The Google Maps Android API Utility Library includes a heatmap
utility, which you can use to add one or more heatmaps to a Google map
in your application. Heatmaps make it easy for viewers to understand
the distribution and relative intensity of data points on a map.
Rather than placing a marker at each location, heatmaps use color to
represent the distribution of the data.

Get Directions Google maps Android

There is a Google map and on it marked objects. With GPS defining man's place on the map.
The aim is to set the phone automatically detects and plot a route to the nearest object. How can it be obtained?
I find this tutorial very helpful:
http://www.anddev.org/google_driving_directions_-_mapview_overlayed-t826.html

Categories

Resources