On my Android app, I am trying to implement Dijkstra's algorithm for some cities, but I want to give weights to the streets manually. Is there any way I can get a graph of all crossroads of a given city and the streets connecting them using Google Maps Android API for implementing this? If no, is there any other service that will provide me with a similar feature?
Related
I'm building a route recommendation app in Android Studio where the user can see the best route between two destinations on the map. I am using Google Maps APIs for that and I know that it's using Dijkstra's algorithm to determine the route. But I wonder if the API can update the route according to real-time traffic, I didn't find any information about that.
Google Maps is updated constantly – literally, every second of every day!
refer this page
I've been researching for a long time in finding tutorials.
This is what i want to attain/make, Credit to Voyage: Route Planner
That application itself is similar for what i want to make.
Questions are:
-How to plot multiple destination and provide Route for the user in Google map?
-Is there any books/tutorials/website that i can read/use/watch to learn more about google map?
How can i give the directions to the user after i provide the route? or how can i do this?
-I've already saw similar question like this but then it is written in Javascript.
Thank you.
To answer your questions:
How to plot multiple destination and provide Route for the user in Google map?
As far as I know, multiple destinations support hasn't been an added feature yet for Android as also discussed in this thread.
However, you can get some ideas about getting directions for multiple destinations from the given suggestion in Google Maps Help Forum and routing from this YouTube video - Google Maps Routing Multiple Destinations
Is there any books/tutorials/website that i can read/use/watch to learn more about google map?
You may use these helpful references, video and others
To plan a route through a series of up to 23 locations using the Google Maps Directions API, you can use Waypoints.
Android Location API - Tutorial
How can i give the directions to the user after i provide the route?
As discussed in Directions Requests, this can be done by sending HTTPS or HTTP requests and adding certain parameters with the following format:
https://maps.googleapis.com/maps/api/directions/outputFormat?parameters
I hope that helps.
I want to receive roads information from Google Maps API like the regular street info.
For example, in the Google Maps application, you can see the traffic in each road. Is there any way to receive this info in data and not just view on the screen?
I need to get information such name, traffic, speed-limit and point of start and end.
I think about something similar to the existing streets info, I will give a location (long,lat) and the system will return the nearest roads around (maybe crossroads also).
Is there any way to get this information with Google Maps API? If not, there is another service that can provide this info?
I tried to find some details but I can't find anything...
You can use Google Directions API for this. It provides you closest directions, distance and time to travel. I also recommend using Google-Directions-Android library for parsing all that stuff, it really saves a lot of time.
I want to retrieve neary by locations from my current locations how can I do it...
For example
If I am In Ahmadabad city than give the list of all hotels of ahmedabad city
how can i do it
plz help me
Use Google-Place-Api for this.
There are nice tutorials for how to use this api in android.
Part 1: Using Google’s Places API to Develop Compelling Location Based Mobile Applications
Part 2: Using Google’s Places API to Develop Compelling Location Based Mobile Applications
Also SO questions:
Using Google Places API in Android
Using Google Places API
Blog:
Introducing the Google Places API
how can I implement algorithms such as Dijkstra or backtracking on Google Maps integrated in Android ? For example I want to compute a route from city A to city B such that I pay the lowest price for gas.
Check this post. It has the Route finding Example. Google removes the Route finding api. But we have develop the code for the draw the route using Overlay. this is what done on that working example.
Since Google Maps doesn't provide access to the actual road data, I don't think it is possible to implement your own routing algorithm.
You could use road data from another source such as http://openstreetmap.org .