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...
Related
I am currently working on my thesis in the field of last mile delivery in urban context.
I want to inquire about a capability of Anylogic software, we are developing an agent based simulation model of last mile delivery in urban context. One of the most important areas of simulation in our model, is to use the time and distance needed to move from point A to point B by the driver in our analysis.
Therefore, we are inquiring if Anylogic is capable of providing the user “us” with the time needed to move from Point A to Point B without assuming the speed of the driver, similar to the output provided from software such as Google Maps, OpenStreetMaps, etc… as the attached picture. We are wondering if Anylogic have a built in API to connect with the Distance Matrix API from Google Maps, that retrieves travel distances and time between start and end points as calculated by the Google Maps API.
This the link to the Google maps API: https://developers.google.com/maps/documentation/distance-matrix/intro#Restrictions
So far I have used the provided openstreetmaps by Anylogic, but it only gives routes and produces time based on assumed speed for each agent which does not reflect the real life situations in the case of traffic jams and other causes that varies the travel time.
Thanks in advance!
Example picture
You can do it but you need to have a valid subsription with Google to access their data. It is not cheap but if you have it, AnyLogic can access it via API.
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 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.
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
I need to know how to reset the query limit for the Google Maps API v3. I know that I exceeded it more than three days ago, but it has not reset and I am still hitting it if I send more then 5 requests. How do I restore it completely to be able to get that 2500 (or whatever the request limit is) again?
I need to geocode some addresses and put them (lat, lon) into a database. I have done so far 2500 addresses. I need to do another 1000 and then it will be just one request on page load.
According to the Google Geocoding API documentation, there are actually two limits. First of all, there is the 2,500 request per day limit, which you say you triggered a few days ago. However, there is also a separate rate limit, which is probably what you are hitting here.
The rate limit will prevent you from making many successive geocoding requests in a short time, which it seems is what you're trying to do. There is no way around this, since making 1,000 requests on a single pageload is not the intended use of the Google Geocoding API.
Additional, according to Google:
Note: the Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.
This probably means that your overall plan to use the Google geocoder and store the results in a database is a violation of Google's terms of service.
If (and only if) you are going to show the results & marker on a Google Map (required by ToS), then these articles would probably help you:
Geocoding Strategies to make the right decision as to whether you need to use PHP (server-side) or JavaScript (client-side). It sounds like you're right to use PHP.
Geocoding Addresses with PHP/MySQL to do the batch geocoding, provided your use case complies with the Terms of Use ;) -- mind the paragraph about Timing the Geocode Requests as Rohan points out your issue is likely that you're sending requests too fast.