semyoren / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

Bug in code does not allow removal of close button #301

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There is a bug on line 97 which does not allow me to remove the close button 
(version 1.1.13 [March 19, 2014]):

this.closeBoxURL_ = opt_opts.closeBoxURL || 
"http://www.google.com/intl/en_us/mapfiles/close.gif";
if (opt_opts.closeBoxURL === "") {
    this.closeBoxURL_ = "";
}

If opt_opts.closeBoxURL is "falsy", it will default to the close.gif URL. This 
means that the 'if statement' afterwards will never be true, as an empty string 
IS falsy and it will be turned into the close.gif URL.

Either these lines need to be swapped or you need to check whether 
opt_ops.closeBuxURL is a string.

Original issue reported on code.google.com by TheBe...@gmail.com on 26 Mar 2014 at 3:29