title: Cannot convert google map to image using html2canvas
body: <p>I tried to convert google map to image using hml2canvas. But it didn't help me. I got an empty png file. Please help.</p>
  
  <p>I tried few solutions but it didn't work for me
  <a href="https://github.com/niklasvh/html2canvas/issues/145#issuecomment-11449761" rel="nofollow noreferrer">https://github.com/niklasvh/html2canvas/issues/145#issuecomment-11449761</a>
  <a href="http://jsfiddle.net/Behseini/j17mwmjm/" rel="nofollow noreferrer">http://jsfiddle.net/Behseini/j17mwmjm/</a></p>
  
  <p>I'm not able to use google static API because I generate google map from kml file and have lot of coordinates which exceeds the GET Url limits.</p>
  
  <pre class="lang-js prettyprint-override"><code>    &lt;div id="map-canvas" style="height: 500px;"&gt;&lt;/div&gt;
      &lt;div id="maptoimage"&gt;&lt;img id="imagemap" src="" /&gt;&lt;/div&gt;
       &lt;script&gt;
          html2canvas($("#map-canvas"), {
          seCORS: true,
          onrendered: function(canvas) {
              theCanvas = canvas;
              document.body.appendChild(canvas);
  
              // Convert and download as image 
              Canvas2Image.saveAsPNG(canvas);
              // to show the generated image in div
              $("#maptoimage").append(canvas);
              // Clean up 
              //document.body.removeChild(canvas);
          }
       });
       &lt;/script&gt;
  </code></pre>
  
  <p>The google map is loaded in map-canvas div.</p>