I'm building a website with a button. When I hit the button on a tablet or smartphone the google maps android app should be starting with a direction, which is set on the website.
With one source and one destination address it's not a problem. For this I can use:
google.navigation:q=latitude,longitude
Link
But I need to start the navigation with multiple waypoints.
Is there also a possiblity to do this?
You mean a list of waypoints like this:
Here is the link to the sample
Related
I have an app which opens Google Maps from where the user is likely to start the Google Navigation from point A to B. Is it possible to open Google Maps and therefore Google Navigation only in specific proportion of the screen and display some additional (but minimal) information from my app next to the navigation?
I am thinking of something like this:
Additionally, is it possible to receive a broadcast when during the Google Navigation the user has arrived to her destination?
I know it is a bit far fetched, but maybe there are some ideas.
If you are still interested in knowing about this after 2 years.
Short answer: Yes (with a but).
If you are asking about displaying a full Navigation experience with turn by turn instructions, a puck, routines on Google Maps, then the answer is: It's illegal to do it without Google's permission. If you look at the Lyft app for drivers, they do have a full navigation experience on top of Google Maps because they partnered with them. So, it's possible, but requires direct communication with Google engineers.
For a workaround, you could show an embed Google Maps view in your apps, and show Markers, Polylines. They also have these APIs to get directions from one place to the other one. For example:
https://maps.googleapis.com/maps/api/directions/json?origin=Disneyland&destination=Universal+Studios+Hollywood4&key=<YOUR_API_KEY>
NOTE: Fees will apply when using these APIs. Check their documentation for more details about the workaround.
You can but you need to contact google personally this is google explanations about this subject and the contract page specially for your request https://cloud.google.com/maps-platform/ridesharing/
Not directly from Google map's navigation . But you can create your own by using
Direction API.
https://developers.google.com/maps/documentation/directions/start#sample-request
yes ,
you can use point an geography point by polygone and line canvas for routing the path between two point on google map.
for more reference reffer this Link.
I'm working on a web application that makes use of the Google Maps Directions API. I am trying to create a hyperlink below some dynamically created directions (using lat/lon coordinates as waypoints) that will allow a mobile user to view and interact with the same directions on their mobile device.
As an example, I have created a directions link with 3 waypoints made from lat/lon pairs. The first is to the Southwest of Atlanta (33.67,-84.61). The second is to the North (34.01,-84.33), and the third is to the Southeast (33.66,-84.10). (Think of drawing a simple "A" shape over the city of Atlanta.) Using several aging 3rd party guides and other StackOverflow answers, I've made the simplest version of a maps URL that seems to return my desired result. It looks like this:
http://maps.google.com/maps?f=d&saddr=33.67,-84.61&daddr=34.01,-84.33+to:33.66,-84.10
This directions URL works fine in a web browser, even a mobile one, but seems to have differing results in both iOS and Android native versions of the Google Maps application. Below are screenshots of some testing I was able to do on the above URL.
Android Google Maps app - Gives directions from the start address (saddr) to the first waypoint and ignores anything else.
iOS 9 Google Maps app - Gives directions from the saddr to the last waypoint and ignores points between!
The very same URL seems to play nice when you open it with:
Android Marshmallow Chrome
iOS 9 Chrome
iOS 9 Safari
Windows 7 Chrome
Does Google officially document these URL routes somewhere? What parameters can I use to accomplish my goal of consistency for direction link behavior across mobile platforms?
We can request multiple stop directions to launch Google Maps like below,
Forming the Directions URL
https://www.google.com/maps/dir/?api=1¶meters
Usage:
https://www.google.com/maps/dir/?api=1&origin=Paris%2CFrance&destination=Cherbourg%2CFrance&travelmode=driving&waypoints=Versailles%2CFrance%7CChartres%2CFrance%7CLe+Mans%2CFrance%7CCaen%2CFrance
For more examples reach out to official documentation.
This would be the place to check the guide
https://developers.google.com/maps/documentation/directions/intro#Introduction
I'm not sure how different data set you get it in different platforms. but make sure you are giving a proper transport type, alterneteRequire flag and Optimize flag.
I noticed some trouble in parsing the polyline present in the legs which is giving some discontinued polyline path. I'm not sure though its my logic or the data is wrong.
We would have all used the google maps app on android, so my question is little relevant to that.
In the gmaps for android app, when I choose a driving route, the route gets displayed on the map with voice and text commands. Suppose I deviate from that path, it recalculates the route and alerts me saying follow the original route.
So my question is, can we do this in the google maps API that is provided for android in our own app? If so what is the best followed approach.
My use case goes like this: I have a user who will start his journey to a set of client hotels, and if the transit he takes deviates I simply have to alert him saying he is following a wrong route or he has to follow the modified route. Kind of a security feature.
Can anyone point me in the direction of a tutorial on how to use GPS (Google maps) to navigate between 2 points in an Android app. I have searched for the last few hours and can only find
tutorials on pinpointing current location.
What I need to do is show current position on map, and then navigation to a set destination on map. So e.g. you are at point A - navigate to point Z
EDIT: Sorry but I should have clarified. What I want to do is just have a button in the app that the user clicks. Once clicked, Google Maps app open and from here Google can do the rest. I don't need the map to be displayed in my app at all.
There is no easy way to do it, you will need to get the direction from a location API such as Google Directions API or Cloudmade to give you all the way points between your 2 points.
you then however have to plot the path and then handle the voice controls yourself
you can however use and Intent to launch the google navigation app in the google maps app and just have google maps do everything but that does not sound like what you want
You can use a VIEW intent using standard google maps parameters. If Google Maps is installed on the device, the user will be able to choose to open it using that or the default browser, etc.
Unfortunately, there's no way to do this directly with a geo: intent at this time. In any of my mapping applications, I've given up bothering with geo: because it's just not mature or standardized enough.
For a great list of url parameters to use(including "directions" mode), check out Everything You Never Wanted to Know About Google Maps' Parameters. I keep it bookmarked.
I am working an application where user need to develop turn by turn navigation.
I have developed this by using this link
Now this gives me route and very good turn by turn navigation.
But my question is suppose if the user has missed the turn and he takes other turn then how would I come to know that user is not on the path specified?
Need help in this regard.
Thanks in advance
The directions gives you the whole distance of the route, you can check if this distance is increasing, this means he is going on the wrong route which is also not so efficient solution but I can't see any other way to do it unless Google provides directions & navigation in Android Google Maps SDK.