Update InfoWindow.js
Prevent null pointer error
MODIFY
www/InfoWindow.js
www/InfoWindow.js
@@ -162,6 +162,9 @@ var InfoWindow = function() {
utils.extend(InfoWindow, BaseClass);
InfoWindow.prototype.close = function(marker) {
+ if (!marker) {
+ return;
+ }
var map = marker.getMap();
map.off("infoPosition_changed");
marker.off("icon_changed");
@@ -179,6 +182,9 @@ InfoWindow.prototype.close = function(marker) {
};
InfoWindow.prototype.open = function(marker) {
+ if (!marker) {
+ return;
+ }
var map = marker.getMap();
map.bindTo("infoPosition", this);
marker.bindTo("infoWindowAnchor", this);

Update InfoWindow.js

Prevent null pointer error