Our website is based in China, so we use the google.cn/maps codes provided in the past by Toolset. These work fine on the front end when displaying maps, but when entering an address in wp-admin or if a user is filling out a CRED form with a maps address field, the Google autocompletion service causes problems because it's still being called from: hidden link?
I was in the US for the past few months, so I didn't notice the issue until I came back to China. Is there any snippet I can use to fix this? Thanks!
Thanks for the feedback, and sorry for the inconveniences this might be causing you.
I reviewed the Toolset Maps, code, and we are actually just loading two scripts from the Google Maps API: one for their JS API and another for their geocode API. Nowhere in our code we do a direct call to maps.googleapis.com/maps/api/place/js, which means that this is a call strated by our plugin but not done by us.
Tying to find some information about this, I found a bug reported against the Google Maps API, that is basically this same one: hidden link
Basically, even when using the right Google Maps API URLs that they provide for usage in China, their own responses contain traces and URLs that need to get called, and that point to the natural Google Maps APIs, not the one sin China. As a result, the autocomplete feature is compromised, and the places API cna not be entirely used in China.
I am adding my voice to that bug report to Google, but this is out of our hands to fix this, as this comes from a response provided by their own version of the API used for China, not from our own responses.
Sorry that I do not have a better answer at the moment, but I do hope it helps.
Thanks for your reply. Now I understand how this works. It seems that the thread you linked was closed, so I don't think Google reads it anymore. I opened a new one here:
hidden link
In the meantime, would you have any idea on how to kill that particular request IF the user is unable to connect to .com servers? Obviously some users will be outside of China, or on a VPN, but for the ones who can't connect, the page keeps loading and blocks other elements from displaying.
Thanks a lot for the input. We will definitely be implementing something like this on Toolset Maps, even adding some visual hints to users to explain why some things are not working properly. I am adding a ticket for this right away, as I also understand this is a blosking problem for some of you.
This will surely get included in our next version, and as soon as I have a working version, we will publish an errata with a patch that you will be able to use on your site right away.