title: Python + Google Map JavaScript API: this.D.bind Error adding Marker to Map
body: <p>I need some help from you.
  Executing this code from the Python IDLE console, I have an error: </p>
  
  <p><code>"TypeError: 'undefined' is not a function (evaluating 'this.D.bind(this)')"</code></p>
  
  <p>and the marker is not visible on the map.</p>
  
  <p>I execute the html code in a browser and I don't have error. The map and the marker is perfect.</p>
  
  <p>I found that the error is in the marker.js file: <a href="http://maps.google.com/maps-api-v3/api/js/32/2/intl/es_419/marker.js" rel="nofollow noreferrer">http://maps.google.com/maps-api-v3/api/js/32/2/intl/es_419/marker.js</a></p>
  
  <pre><code># -*- coding: utf-8 -*-
  import sys
  
  from PyQt4.QtCore import *
  from PyQt4.QtGui import *
  from PyQt4.QtWebKit import *
  html= \
  """
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Simple Map&lt;/title&gt;
      &lt;meta name="viewport" content="initial-scale=1.0"&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;style&gt;
        /* Always set the map height explicitly to define the size of the div
         * element that contains the map. */
        #map {
          height: 100%;
        }
        /* Optional: Makes the sample page fill the window. */
        html, body {
          height: 100%;
          margin: 0;
          padding: 0;
        }
      &lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="map"&gt;&lt;/div&gt;
      &lt;script&gt;
        var map;
        function initMap() {
          map = new google.maps.Map(document.getElementById('map'), {
            center: {lat: -34.397, lng: 150.644},
            zoom: 8
          });
        }
      &lt;/script&gt;
      &lt;script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDfBy5lpFyQzq7pRpKEBeg7jaXH5hnHul8&amp;callback=initMap"
      async defer&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  """   
  class Window(QWidget):
      def __init__(self):
          super(Window, self).__init__()
          self.view = QWebView(self)
  
          self.setupInspector()
  
          self.splitter = QSplitter(self)
          self.splitter.setOrientation(Qt.Vertical)
  
          layout = QVBoxLayout(self)
          layout.setMargin(0)
          layout.addWidget(self.splitter)
  
          self.splitter.addWidget(self.view)
          self.splitter.addWidget(self.webInspector)
  
      def setupInspector(self):
          page = self.view.page()
          page.settings().setAttribute(QWebSettings.DeveloperExtrasEnabled, True)
          self.webInspector = QWebInspector(self)
          self.webInspector.setPage(page)
  
          shortcut = QShortcut(self)
          shortcut.setKey(Qt.Key_F12)
          shortcut.activated.connect(self.toggleInspector)
          self.webInspector.setVisible(False)
  
      def toggleInspector(self):
          self.webInspector.setVisible(not self.webInspector.isVisible())
  
  def main():
      app = QApplication(sys.argv)
      window = Window()
      window.show()
      window.view.setHtml(html)
      app.exec_()
  
  if __name__ == "__main__":
      main()
  </code></pre>