1

I'm ProjectedOverlay.js user and I have noticed a problem with the remove function.

In past versions some people claimed that there was an error concerning the placement of a this.setMap(null) in this function. This was apparently solved removing the mentioned line. But I think the problem was not completely solved, because omitting this call, when you change the map zoom the overlays would appear again.

I think that a better solution is to put the mentioned call at the end of the function. I've tested it and for me it's working perfectly.

// Remove the main DIV from the map pane

ProjectedOverlay.prototype.remove = function()
{
 if (this.div_) 
 {
  this.div_.parentNode.removeChild(this.div_);
  this.div_ = null;
  this.setMap(null);
 }
}

Regards

4

0 回答 0