I am currently working on a platform that will be launched worldwide, and I work in Shanghai, China, and, as you know, there is a very big firewall policy here.
The site contains a custom map view created using the Google Maps API, because Google allows many nice features to change the look of the map.
But now I have a problem: if the user wants to access the site without a VPN, the entire page on which the card is located slows down, crashing and interrupting my login procedure.
The following are errors displayed in the console view:
GET https://maps.googleapis.com/maps/api/js?key=1010101010101&sensor=true net::ERR_CONNECTION_TIMED_OUT Uncaught ReferenceError: google is not defined
I want to know if there is a way to check if I have a connection to the Google Maps API before executing the code?
Greetings
Koen
source share