If so, do we need to whitelist any servers for HTTP (not HTTPS) data transfer? If not, is there a recommended fallback?
Reference: https://developers.google.com/maps/faq#china_ws_access
Related
On the notes of this page, there is a mention that the Geocoding API key should be server-restricted
During development and testing, you can register a project for testing
purposes in the Google API Console and use a generic, unrestricted API
key. When you are ready to move your app or website into production,
register a separate project for production, create a server-restricted
API key, and add the key to your application.
Is the geocoding API only meant to be used on a server type instance?
Can I put the Geocoding API key on a mobile device by bundling it within the app using restriction for android/ios? I'm concerned that I will violate the said "server-restricted API key" clause.
PS. I'm aware that Google API keys can be restricted to android/ios/ip etc.
In order to make Google Maps Web Service requests from a mobile device (without using the Google Maps SDK), you have to use an unrestricted key. Each mobile device has its own IP address and it is not feasible to set IP address restrictions to all the mobile devices that use your app.
Android or iOS API key application restrictions only work for requests made through the Android or iOS SDK.
If you want to use a restricted key for web service requests from mobile devices, you have to use a proxy server that makes the requests on behalf of the mobile app.
I’ve been reading the documentation and it seems that the Geocoding Web Service API is not fit for my use case. There is a “Javascript Google Maps API” that I can use.
is it possible to have an application (web-based) with google map api that works even without internet connection?
Say have to cache or store the map somewhere, so that when there is no internet connection the application still works.
I doubt it. Google Maps is a web service, which you can place into your application via an API key.
Therefore, you'll need to have an internet connection to actually make a call to the Google Maps web service to validate your API key and load it.
I'm assuming you mean a web application running internally within an intranet to access Google maps. This link might give you some clues evn though there seems to have an Android version of this feature. A google search on "offline google maps" returned quite a few Android links
I'm using Google Maps web services to perform server-side (reverse) geocoding.
I've got a browser-side and server-side Google API key from the Google APIs Console, which permits the Google Maps JS API to use higher request quotas, and enables pay-per-use for overages (successfully tested in-browser via JS). But the server-side key doesn't seem to work on web services requests.
For example, this URL works fine:
http://maps.googleapis.com/maps/api/geocode/json?sensor=true&latlng=43.477329,-80.548601
But if you add a "key=..." parameter, as in the other APIs, I get a REQUEST_DENIED status.
Am I doing something wrong, or is this just not supported on the web services APIs (yet)? Will it be supported in the future?
See also
request_denied when i include key=my_api_key
Nope, you're not doing anything wrong.
Unfortunately, enforcing tight limits on the Google Geocoding API, also called "Server-Side Geocoding", is Google's design. If your app needs more than 2,500 Server-Side Geocodes per day, then you'll need to upgrade to their Google Maps API for Business product.
Hold on, it gets worse.
If your app's server IP address is shared with other apps, that 2,500 request daily limit applies to ALL of them. This includes apps that share the same server IP address as you, but don't belong to you! This can be a common situation with any PaaS, like Google App Engine or Heroku. So, even if your app works flawlessly today, there is no guarantee that it's still going to work tomorrow.
In the article, "Geocoding Strategies", Google indicates the solution is to "almost always" use "Client-Side Geocoding" via the Geocoding Service, part of the Google Maps JavaScript API V3. The primary reason is that limits are enforced per user, per session. Requests like this shouldn't run up against quota limits unless you're executing geocode batches on the client (not a typical use case).
One golden nugget from the "Geocoding Strategies" article: Design a page that takes user input, calls the client-side Geocode service method, then passes that information to your server app where it can be processed, and hopefully cached. This is FAR from ideal, but if upgrading to Google Maps API for Business isn't an option, it might be the only way to go.
Good luck!
According to this post, your API key should work as one of the three option for requests over 25,000 loads per day.
https://developers.google.com/maps/faq#usagelimits
Is it permitted to use the Google Maps API (ver 2) in offline mode if I use OpenStreet tiles?
If so, how can I do this? I can store the Google JS file locally (main.js). What else do I need to do?
It is not permitted according to the Terms Of Service
http://code.google.com/apis/maps/terms.html
It is also unlikely to work, as the API Javascript is designed only to work online e.g. it must be able to talk to Googles servers.
I'm embedding a map on a page via https URLs but I'm still seeing resources loaded via http:// in the Net tab in Firefox. I've done some Googling and everything I'm finding is about the Google Maps API. Has anyone gotten this to work over SSL before?
http://googlegeodevelopers.blogspot.com/2011/03/maps-apis-over-ssl-now-available-to-all.html
Ismail is right - check out the thread on Options for Google Maps over SSL.
Personally I had to migrate my Google maps to Bing for the https connection api.
The Google map apis should now be available over https - but at least from my point of view there may be clashes with the licence (not-for-profit organisation but the site is access protected).
Have a look at Mapstraction if you want to swap map interfaces around to try them out.