Google Maps API often fails to load from China

Update 2015-01-05:

As Dan pointed out in the comments, Google has instructions for using the Maps API from China:
I had that tested and it worked! Thanks Dan!

Update 2014-11-05:

Since about September 2014, * is completely almost completely blocked in China. This work around doesn’t apply anymore šŸ™. See update above.

Original Article:

The problem

Recently I was working on Cornerstone882 website. I had the following problem: for clients located in China, Google Maps JavaScript API failed to load very often.

Moreover, the API not loading would freeze the Slideshow before its initialization, not really acceptable!

The solution

In theĀ Google Maps JavaScript API v3 tutorial, the sample code goes like:

<!DOCTYPE html>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
      html { height: 100% }
      body { height: 100%; margin: 0; padding: 0 }
      #map-canvas { height: 100% }
    <script type="text/javascript"
    <script type="text/javascript">
      function initialize() {
        var mapOptions = {
          center: new google.maps.LatLng(-34.397, 150.644),
          zoom: 8,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        var map = new google.maps.Map(document.getElementById("map-canvas"),
      google.maps.event.addDomListener(window, 'load', initialize);
    <div id="map-canvas"/>


Just remove the SSL protocol to download the library using HTTP instead of HTTPS. It’s no secret that authorities here are not big fan of encryption when it is connections coming in or out of China.

So we replace:

<script type="text/javascript"


<script type="text/javascript"

And now the map load every time without freezing the website!


  1. Adrian October 30, 2014 11:02 pm  Reply

    Hey Martin, we’re facing the same issue now. Does your work-around still work?


    • Martin DENIZET November 5, 2014 11:10 am  Reply

      Hello Adrian,
      Sorry for the late reply.
      Unfortunately * is now completely blocked in China and it’s probably definitive šŸ™ . I updated the article accordingly.
      We now need to use Google’s Chinese clone Baidu or other China-based service providers to have a map displaying correctly for China-based users.

Leave a Reply