Zn2O / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

InfoWindow no longer displays content and exceptions are thrown #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release:
1.0 RC

Detailed description:
When you run the following code, click a few times on the map to place icons.
If you click the icons one by one, you'll see "test" appearing inside the info 
windows.
At some point when the info window is open, click anywhere on the map (anywhere 
there's no icon yet). This closes 
the open info window. From this point on, all info windows you try to open will 
be empty and JS exceptions will be 
thrown (Object doesn't support this property or method).

final MapWidget map = new MapWidget();
map.setPixelSize(400, 400);
RootPanel.get().add(map);

map.addMapClickHandler(new MapClickHandler() {
    public void onClick(MapClickEvent event) {
        if (event.getOverlay() != null) {
            return;
        }
        final Marker m = new Marker(event.getLatLng());
        m.addMarkerClickHandler(new MarkerClickHandler() {
            public void onClick(MarkerClickEvent event) {
                map.getInfoWindow().open(m, new InfoWindowContent(new Label("test")));
            }
        });
        map.addOverlay(m);
    }
});

Workaround if you have one:
Nope.

Links to the relevant GWT Developer Forum posts:

Original issue reported on code.google.com by tom...@gmail.com on 11 Oct 2008 at 9:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Observation: It might be helpful to distinguish between 2 situations. Follow 
the 
instructions precisely.

Put 2 markers on the map. Do nothing else.

1. Open the info window on the first marker. Click anywhere on the map. From 
this 
point on, you can do whatever you want; nothing goes wrong.

2. Reload the page and open the info window on the first marker. Open the info 
window 
on the second marker. Click anywhere on the map. From now on you'll get 
exceptions.

I guess this means there's some cleanup code not properly executed in case 2.

Original comment by tom...@gmail.com on 11 Oct 2008 at 11:58

GoogleCodeExporter commented 9 years ago
I believe this is a dup of issue 156 and issue 181.

Original comment by galgwt.reviews@gmail.com on 13 Oct 2008 at 3:52

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 14 Oct 2008 at 12:42

GoogleCodeExporter commented 9 years ago
Updating account names

Original comment by zundel@google.com on 21 Dec 2009 at 2:00