I am working on an app where I want to use the Google Maps API.
The problem is the connection to Google Maps API server is unstable. Sometimes it's OK but other times it's blocked because I'm in China.
The solution I've come up with is to make all the Google Maps API requests through a reverse proxy. I can setup a server as a reverse proxy in American or Hong Kong where there is a steady connection to Google maps server.
Then I have to change the urls of all the Google Maps APIs in my app to point to my reverse proxy and the proxy will proxy_pass all the requests to Google Maps server.
There are a few questions I have about this:
How would I go about implementing the client side libraries? Do I have to change them? If so, can I just download the Google Maps JavaScript API file and change the domain names of the urls in it to the domain of my proxy server?
And how would I go about Android and iPhone apps? I'm uncertain whether the Android and iPhone SDKs will make the request with http protocol. If it is, how can I replace the domain names of the APIs with the domain name of my proxy server?
I thought maybe there is a way to catch all the http requests made in my app and modify them before they get sent but after googling for a while I've found it's hard to do.
So is it possible to do this with Android and iPhone apps? Or is there a better way to achieve it with a web app?
I also would like to know is it worth the effort to do this since the solution seems to be rather complex and using the Google Maps API is not a necessity because there are replacements to it in our country. I just prefer Google Maps API to them because of its neat API style and the prettier look of maps.