title: Knockout loses bindings when Google Maps API v3 info window is closed
body: <p>I'm data binding to a div which I am then setting as the content of an InfoWindow. When markers on the map are clicked I'm changing the bound observable, which updates the content in the info window. All of this works fine until the info window is closed. Google Maps removes the info window from the DOM, along with my div which had the bindings on it. Re-opening the info window results in its contents being frozen in the state it was in at its closing. </p>
  
  <p>Any changes to the observable no longer update the ui, including using valueHasMutated. I've tried just resetting the content of the info window and rebinding, but the JQuery element still exists and I get duplicated content. I've also tried using cleanNode and rebinding but also get duplicate content with that.</p>
  
  <p>The div which I'm binding too:</p>
  
  <pre><code>&lt;div id="placeTmpl" data-bind="with: place"&gt;
          &lt;h3&gt;
              &lt;a data-bind="text: name, attr: { 'href': detailsUrl($data) }"&gt;&lt;/a&gt;
          &lt;/h3&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The Google Maps InfoWindow:</p>
  
  <pre><code>window.infoWindow = new window.google.maps.InfoWindow({
      content: ''
  });
  window.infoWindow.setContent($('#placeTmpl')[0]);
  </code></pre>
  
  <p>Event listener and updating observable</p>
  
  <pre><code>window.google.maps.event.addListener(marker, "click", function() {
      window.viewModel.openInfoWindow(marker, data);
  });
  
  self.openInfoWindow = function (marker, data) {
     for (var i = 0; i &lt; self.places().length; i++) {
          if (self.places()[i].placeId == data.PlaceId) {
              self.place(self.places()[i]);
          }
      }
      window.infoWindow.open(map, marker);
  };
  </code></pre>
  
  <p>Like I said, this all works great until the info window is closed. I'm just looking for a way to force knockout to start updating the ui again or to clear and rebind when the info window is closed.</p>