I want to get travel time betweeen two locations using Google API. I have already spent a couple of hours in sorting this out but no results yet. How do I do this?
The Distance Matrix API can get you travel time pretty easily. The documentation for the web services (HTTP interface) gives an example.
You can also use the Javascript API v3 if you'd prefer that. There's another example at the bottom of the page.
If you want travel time in current traffic, you'll need a Google Maps for Business license.
Related
I have person's location, and I want to put markers at all points where the person can reach by traveling for 10 Min in any direction.
The person can choose any travel method like Car, Public transport, Walk, or maybe all.
After some googling, I found some existing services but they have issues:
mapnificent, its travel time is totally incorrect for public transport
isoscope is not ready yet
iso4app Too expensive as compared to google mapping services, plus it's not there yet
Can someone suggest me how to do this using Google Api? Thanks in advance. ^^
BTW there is a similar question, but that one is about Road Distance, My question is about Travel Time.
There is no build-in functionality in Google Maps API for time drive polygons (isochrone maps). The feature request was filed in Google issue tracker some time ago. You can see it on:
https://issuetracker.google.com/issues/63256697
Feel free to star the feature request to add your vote.
I know that developers tried to implement a workaround that uses multiple directions requests, but these calculations typically are time consuming. You can have a look at the following example
http://sandropaganotti.com/wp-content/goodies/demos/isochrone/
It is outdated, because it was written for v2 of Maps JavaScript API, however you can try to migrate it to v3.
Other sources that might be useful for you:
https://gis.stackexchange.com/questions/31057/creating-drive-time-polygon-around-map-point
https://gis.stackexchange.com/questions/46/can-you-make-a-travel-region-polygon-with-with-google-maps-api
I hope this helps!
I want to show average traffic layer on google map like this.
But, this map shows the real time data of traffic, instead i want to show average traffic over some period of time on google map, is it possible? or any other maps api can help?
Please star this issue issue tracker link to vote and get update for this feature.
If you check the Google Maps documentation, the only information that you can find here about traffic is the Traffic Layer. But this traffic layer add a real-time traffic information(if supported) in your maps. But on the Google Maps website, there is a typical traffic that you can use to see the information about traffic in any given day and time.
But I think this typical traffic is not yet available in Google Maps API. So what can I suggest you is to make a feature request about this information.
For more information, check this SO question if it can help you to your problem.
I am planning to build an app that would find the shortest distance from one location to another and other things too.
It requires the latitudes and longitudes of a place and distance of all the coordinates from say X meters from it, distance in the sense of actual road distance. I do not want any graphics or showing the map but just the plain data.
This means that i can query for some address with the distance X, and it would give me the details. I looked into Google Map Api, but that looks like to cater for some kind of client job scheduling. I even looked into Bing Map Api. It seemed to provide things. But i thought to ask here before proceeding.
Any tips on available options ?
Fortunately you should be able to find many many code samples out there for models. But first:
I'm not sure what you mean by Google Maps API looks like it caters to client job scheduling; it actually is pretty much the opposite! There are limitations to how many requests per day can come from one IP. Also, the licensing for Google Maps is made for client facing applications like web based Store Locators (the application that I used it for) and often requires you to display a Google Map with the information.
You do have a limited license to do business related geocoding and searches.
I think you may be more interested in a product like Microsoft MapPoint http://www.microsoft.com/mappoint/en-us/home.aspx
While there are many competing products and services, the price point here is great. You may also be able to get it for free along with other apps if you register for their BizSpark program http://www.microsoft.com/bizspark/default.aspx
HTH
Geezer
We have run into a wall with our app. We need the ability to take a static stop list and calculate the total working time and total distance of this list. At the same time we also need the option to optimize this list and compare it to the static list to give a comparison of total working time and total distance between static and optimized.
The service we are using for the route optimization works great. It optimizes using Google Maps and gives us the total working time and total distance for the optimized list. Our issue arises when we try to get the working time and distance for the static stop list. The route optimization tool does not allow us to "lock" the stop order, which we could feed the static list and get the working time and distance. So, instead we are using a workaround by using the Cloudmade routing api (which uses Openstreetmaps) to calculate this information for the static.
This is our primary issue - when we originally bring the stops into our system we geocode them using Google maps to ensure our route optimization software has accurate waypoints for optimization. When we pass these stops to Cloudmade/Openstreetmaps it is often not finding the stops and errors out before calculating the working time and distance. It seems OSM is not the most reliable solution.
Does anyone know of a solution similar to the Cloudmade routing api http://cloudmade.com/products/routing that uses Google maps instead? Or does Google offer an api directly that can accomplish this?
Hope this makes sense. Thanks
Take a look at the gebweb tsp solver. It uses the Google directions api. It also tries to reduce the query traffic by using a distance matrix and the maximum of waypoints.
Okay, I'm blind. I found the Google Distance Matrix API that accomplishes exactly what I'm looking for. For some reason I missed it earlier. Too bad Google Maps for biz is $10K a year...
I want to know if anyone who has experience of using both the Google Maps API and the Multimap API can give a good reason as to why one is better than the other - or maybe a list of pros and cons?
I will be working on a complete re-development of a site which currently uses the Multimap (Classic) API and want to consider the possibility of using Google Maps API instead of Multimap (now MS Bing), but I need a compelling reason to justify this decision.
The site currently provides a search mechanism allowing users to search for addresses using postcode/partial postcode or city. The current system has a sqlserver database back-end containing full address details and also uploads (geocodes this information to Multimap with a daily scheduled task). I'm wondering if it's possible with the Google API to avoid the need for the daily upload and just use it's geocoding API instead (though this is limited by Google's restriction of a certain number of geocoding requests per day).
In my experience using the two, Bing Maps are more accurate with regards to their geocaching, but Google have slightly nicer looking Road Maps.
The Google Maps API is slightly more helpful - for example, if you have 2 markers, the map automatically zooms out to the right level, Bing takes a bit more work.
Aerial maps look pretty much the same on both, as do the Hybrid maps.
My advice would be - use Bing maps for geocaching, then if you want really nice looking road maps, use Google. If you're using Aerial, Hybrid or Birdseye view, you might as well stick with Bing.
According to Wikipedia Multimap was purchased by Microsoft some years ago and its direction features were merged into the Microsoft Bing api. I suppose the Multimap API primarily exists for legacy purposes. By the end of 2010 multimap might disappear, so this is definitely a compelling reason to re-write the geocoding part of your app...
In any case I would contact Multimap how long they plan to support their API and if there is a migration path (probably to bing maps).
Bing Maps as well as Google Maps now offer real-time geocoding services over Javascript (see http://msdn.microsoft.com/en-us/library/ff710027.aspx for an example in bing). Which one to pick? Check the terms of usage and the costs of the geocoding requests per day.
Yes skip the old legacy Multimap and use Google Maps or Bing Maps. Both are in active competition and under active development. So one might be better in one area for a few months but the chances are it will change. Eg. Bing Maps was the first with multi-touch support (using Silverlight) but Google Maps now supports it with its v3 API. (unfortunately all but the most basic map overlays will crash Google Maps multi-touch apps crash with the most widely available multi-touch platform: Safari on the iPad/iPhone).
At the moment I think Bing Maps has the edge, but at the end of the day your decision is probably going to be subjective (those maps look nicer / I find the API slightly nicer / etc), or depending on the exact wording of the EULA (ie. do you pay? and how much? for your specific application).
You talked about geocoding. An increasing number of people are looking at using multiple geocoding platforms. Primarily because geocoding coverage of all the services are imperfect, but it also gives you cover if one service goes down.