Google Maps Dircetions API - Arrival time? - google-maps

I use the Google Directions API for calculating the needed time between 2 places. The API gives me an option departure_time, where I can pass the timestamp of the departure time (or "now"). Then the answer is the duration_in_traffic. This is working really great.
But I need to show the amount of time that the user needs with his car, when he want to be at his target at a specific time.
E.g. the user wants to be in Dortmund at 8pm (20:00). So I need to show him when he should start driving to arrive in time at his desired goal. The API-documentation says, that there is a parameter arrival_time, which does exactly what I need. Unfortunately they say it does only work for public-transport.
But Google maps itself offers the desired functionallity even for cars! As you can see in the screenshot: I said that I want to be in dortmund at 20:00 and google-maps says, I should start driving 'arround 18:30'
So how I can I achieve this with my app? Do I need another API or do I need to pass other parameters?
Here is my current API call:
https://maps.googleapis.com/maps/api/directions/json?origin=Bielefeld&destination=Dortmund&arrival_time=1460836800&key=AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxx
best regards
Michael

Related

Google maps API using arrival time with traffic duration

The Google Maps API docs as well as all questions I have found on Stack Overflow all state that departure time must be included to return traffic duration. However, my application requires the use of arrival time and not departure time.
The docs state that one can pass either departure or arrival time, but this is not mentioned in relation to duration_in_traffic. Is it possible to pass arrival time instead of departure time and still receive the duration_in_traffic? Maps itself does this, I don't see a reason for Google's API to be any different.
This is not currently possible, but there is a long-standing feature request to have this feature added. You can star the issue to receive updates and show Google that there is additional interest.

Time required to add missing place name in Google map API

Recently, I have added 2 place's names on Google Maps and they have been approved. However, they still don't show up on Google Maps.
How many days will it take to add a place and make it public?
Suggestion Approval
When you make a suggestion to a place, via the "Send Feedback" option on Google Maps, or using Maps Maker, the suggestion needs to be approved.
This procedure usually takes less than 15 days.
I say usually because they deal with a lot of data submissions and corrections, so there could be a delay in response.
Propagation
Once a correction has been approved, it usually takes two business days for it to propagate all over Google's systems and to appear on google.maps.
Hope it helps!

Places added newly through google places api but the places added to app not to google db

I have added new basketball court to the Google Database 2 days ago but it's not added while I searched for that particular court in google maps . I don't know how to track the status of the court whether it passes the moderation process . I explored it in google places add api but it gives that only the scope of the app in the response .
Also the newly added places is not reflected directly in nearby (app-scope)api. I have got this app-specific court when I pass type params to the api . Then I need to concatenate these two results to get reflected to the application. Am I right?
Please guide me in optimal path to be listed in my application as well as Google's database.
Also Please help me to find my query below.
How can I track the status of newly added places in google .
Please Help me
Thanks in advance.
From the Place Add documentation itself, it is stated that:
When you add a place, the new place is available immediately in Nearby
Searches initiated by your application. The new place also enters a
moderation queue to be considered for Google Maps. A newly-added place
does not appear in Text Search or Radar Search results, or to other
applications, until it has been approved by the moderation process.
So it means that you can see the places that you add. Just take note that you are the only one that can see this as of the time you created/add. in order for the others to view it or make visible, it needs to pass a moderation process. If your add places did not show up after a week or more, then maybe it did not pass the process.
Just read the above link to know more about it.
UPDATE
Unfortunately, Place Add has been deprecated on June 30, 2017 and will stop working on June 30, 2018. So you cannot use this method anymore. For further details please refer to the corresponding geo blog post.

When will future "departure_time" for "driving direction" be available?

My company is looking for map API that supports driving route and time inquiries for future trips, e.g. getting a best route for a trip tomorrow at noon. A closer prediction would be use historical average traffic to generate such a route.
I thought Google Maps would have such capability, but it doesn't seem that they do, according to the description on their website:
"For driving directions: Google Maps API for Work customers can specify the departure_time to receive trip duration considering current traffic conditions. The departure_time must be set to within a few minutes of the current time."
So my question is: why Google is not doing general departure_time based inquiries at the moment? Is Google planning to offer the service in future? If so, when?
Thanks!
You can submit a feature request at Google Maps Issue Tracker

Google Maps API - Getting Street Coordinates

Google Maps API has any way to get the street coordinates of an location?
Is simple: I just want to get the nearest street coordinate. To got this i need, for example, all coordinates that compose a street.
Are there something like this?
You may use the directionService.
Pass the given address(or location) as origin and destination to directionsService.route() and use the travelMode DRIVING . The response should contain the nearest street.
Demo: http://jsfiddle.net/doktormolle/W3VGN/
I found this (ReverseGeocoding in v3): https://developers.google.com/maps/documentation/javascript/geocoding#ReverseGeocoding
Since this thread is old I suppose this could be useful.
These answers are all old, and Google has rearranged the maps API significantly since the answers.
In 2018, the best way to turn a location (long, lat) into a "point on road," is to use the snap-to-road or nearest-road service:
https://developers.google.com/maps/documentation/roads/snap
Note that this API charges a cent per API call, and can take up to 100 distinct points per call. If latency and complexity aren't problems, if you need to answer this question on a client, you could build a server that collects up to 100 requests from different clients, makes one request to Google, and then returns the request data back to the appropriate clients. (For this use, make sure to use nearest-road, not snap-to-road.)
Also, currently, Google Maps has a $200 per-month statement credit available, which may make smaller uses of this API not actually end up costing much (or anything at all.)