yenbao1340 / gmaps-utility-library-dev

Automatically exported from code.google.com/p/gmaps-utility-library-dev
0 stars 0 forks source link

clearOverlays() breaks extinfowindow #160

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. add two markers each with their own extinfowindow
2. click marker 1, then click marker 2
3. call clearOverlays on map

What is the expected output? What do you see instead?

Markers and infowindows should go away, but extinfowindow tries to remove()
window 1 after it has already been removed, leading to a Javascript error.

Try it here: http://devasp.northcarolina.edu/iic/test_suite/customwindow.php

Please provide any additional information below.

This may cause a memory leak (I'm not sure) because apparently those
infowindows, once removed, aren't going anywhere.

Original issue reported on code.google.com by jgarfi...@earthlink.net on 17 Nov 2009 at 2:24

GoogleCodeExporter commented 8 years ago
Changing this:
 if (this.map_.getExtInfoWindow() != null) {

to this:
 if (this.map_.getExtInfoWindow() != null && this.container_ != null) {

in remove()

makes the error go away, but still may not address the underlying issue

Original comment by jgarfi...@earthlink.net on 17 Nov 2009 at 4:44

GoogleCodeExporter commented 8 years ago
apparently it is only a problem if an infowindow is still open, but only on the
second time you open a window.  Try the attached file and follow instructions 
above.
There is a link to clear overlays on the page (you will need to change the API 
key).

Original comment by jgarfi...@earthlink.net on 18 Jan 2010 at 12:05

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by jgarfi...@earthlink.net on 3 Feb 2010 at 1:58

GoogleCodeExporter commented 8 years ago

Original comment by douglass...@earthlink.net on 18 May 2010 at 10:19