I am getting different building shadows when calling https://maps.googleapis.com/maps/api/staticmap?center=40.1150139,-88.2273797&zoom=17&size=600x400&maptype=satellite
vs what I get from visiting
https://www.google.com/maps/#40.1150139,-88.2273797,319m/data=!3m1!1e3
I assume these are taken at different times of the day. How can I get the same image I am getting from Google Maps by calling the API?
There is no way to get satellite imagery for different timestamps via Google Maps Static Maps API at the moment.
The Google issue tracker contains a feature request to make it possible. You can have a look at the feature request:
https://issuetracker.google.com/issues/35826354
Feel free to star it to add your vote and subscribe to notifications.
I currently have an application which takes a a start and end point from a user and sends a request to the google maps directions API, for example: https://maps.googleapis.com/maps/api/directions/xml?key=my_key8&origin=M460PU&destination=NN36NW&sensor=false&mode=driving&units=imperial&departure_time=1501752779
We then display the estimated journey time for a given route. The user has asked if it's possible for us to include a link directly to Google maps so that they can see the route on the maps and make sure it looks ok.
I've seen previous questions such as this one: Link to Google Maps but that seems to be a solution for a simple Google Maps search, where as in my case I want to see a route from the directions API.
I'm trying to figure out if I there's a way I can take the data from the Directions API response and plug that in to a http://maps.google.com/maps URL that the user can click on. Has anyone ever had any success doing this?
As mentioned #geocodezip you should use Google Maps JavaScript API or Google Static Maps API in order to show exactly the same route as the output of Directions API.
There is also an option to open Google Maps web site or native app using the Google Maps URLs. You can have a look at the documentation to figure out how to create the URL:
https://developers.google.com/maps/documentation/urls/guide#directions-action
The only issue is that the Google Maps URLs doesn't provide any parameter for departure time, so you will always get routes for "Leave now" that might have discrepancies comparing to a web service that was requested for a different departure time.
Based on your question I think the Google Maps URL might be
https://www.google.com/maps/dir/?api=1&origin=M460PU&destination=NN36NW&travelmode=driving
My client is sensitive to having ads on their for profit site but don't have 10k a year to pay for google maps.
The new Gmaps TOS says ads may be added to the map, and but mentions a opt out process, and it does not appear that any of the Google Maps V3 maps I see have ads.
So is it easy to get out of displaying ads on a google map?
Know any examples of what these ads look like?
There is an example of what the ads look like here:
http://techcrunch.com/2008/10/09/google-turns-on-text-ads-in-google-maps/
Personally, I have never seen them in a maps application either. If they are only in v3, and you want to avoid them completely, then stick with v2, it will still be viable for quite a while.
If your client wants no adverts you could try open street map. Although this is open source it places restrictions on using data from Google etc
I've started developing a small app which main goal is to draw a map using Google Maps API (v3), and to show business in the area drawn (bars, restaurants and so on).
I found the Google Places API that was supposed to be released this month but it hasn't been. As far as I know the point of that API is to offer results from the Google's database of business, so later we could put those business in the map.
However now I've found this sample which is using the AJAX Search API and Local Search Control for Google Maps to do the same thing.
So the question is, what is the point of the new Google Places API?
Thank you in advance!
The Places API returns a list of locations near a specific lat/lng, while the Local Search API allows for an arbitrary search of Google's database of business listings and other POIs.
When I type in addresses in Google maps for locations in Asia, quite a lot of them are off by more than 200 metres. For example, "blk 85 bedok north road, singapore" is off by more than 300 metres. While I don't expect Google Maps to be spot on every time, sometimes the error is too great for certain use cases. What options do I have to handle inaccurate Google Maps locations in a web app? The web app should let the user enter an address or postal code as part of an entry and I will geocode the address and store the lat-long.
You could use bing, yahoo's and google's Geo Location api's to find latitude and longitude for a location, average the results together and use the result. Thus, if they all agree, you still get a good location, but if they disagree you get the best approximation of all three.
You could even programmatically compare the results from each engine and throw out any that don't agree with the others (for instance, if bing and yahoo agree and google does not, you could throw out google).
Beyond that, if you have a collection of addresses you know to be wrong, you could simply store the correct longitude and latitude for those points, and override the results in those cases.
Of course, to get around this problem at all, you'll need to geocode the addresses, check their validity in some way (as described above), and plot them using their latitude and longitude.
You don't have any fixes for this really, you're at the mercy of the accuracy of google maps here. The important part is you don't know if the address in inaccurate when doing one search to the next, so nothing you can do to handle it.
You can post a topic here and google will see it and often respond as well: Google Maps Local Listing Forums. I'd open something there with some of your examples and hope they get more accurate...that's all you can do in this case.
There are always other alternatives as well, yahoo and bing have mapping APIs, but I have no idea how much better or worse off you'd be going that route.
The problem is not the lat/lng data, in fact, they are correct. The problem is that the geo coords of the map tiles of the public Google maps api are inaccurate. The maps at maps.google.com are provided by a different map provider than the map tiles used with the public Google Maps API that you can embed in your website, use in your own applications, etc.
Check my recent posting at Google Maps & apps with mapview have different current positions
Is the result out on maps.google.com as well as through the maps api?
If on google maps live site the result is accurate then you can do an ajax search to return the correct lon/lat.
I have used this when geocoding UK postcodes
Geocoding UK Postcodes with Google Map API
I tried to reply to the upper answer, but I am not qualified enough yet. Just be aware that whatever you're using for geocoding, sometimes has restrictions on the use of that data. For example, google's geocoding API isn't allowed to be used to display information retrieved anywhere but google maps. The same might be for the others, I don't know what your project is, but it's something to be aware of.