Does anyone have the GWT Google maps working inside the new Layout
panels?

My page is basically a DockLayoutPanel whose main element is a
SplitLayoutPanel whose main element is a MapWidget.  The MapWidget is
set to 100% size.

On startup, the map tiles are sized to a very small part of the area,
although the grey background does seem to cover the entire space:

http://www.infohazard.org/~jeff/mapnolayout.png

If I resize the browser window, the map quickly covers the whole area
and starts to work normally.

I've tried calling MapWidget.checkResize() and the LayoutPanel's
forceLayout() methods but neither have an effect.  Any idea what I'm
doing wrong?

The code is super-simple:

        SplitLayoutPanel split = new SplitLayoutPanel();
        this.add(split);  // to the DockLayoutPanel

        split.addWest(new HTML("<p>blah</p>"), 200);

        LatLng cawkerCity = LatLng.newInstance(39.509, -98.434);
        MapWidget map = new MapWidget(cawkerCity, 4);
        map.setSize("100%", "100%");
        split.add(map);

Thanks,
Jeff

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to