Yeah sorry I was not sure if this was more of a development topic or
typical user problem.
I tried your suggestion of map.checkResizeAndCenter() and it works
perfectly. It also seems a better solution than my original
SimplePanel place holder.
It seems that the Google map object initializes its size as soon as it
is added to the document. Perhaps MapWidget could also implement
RequiresResize?
So now a working example is:
public void onModuleLoad()
{
DockLayoutPanel p = new DockLayoutPanel(Unit.PX);
p.addNorth(new HTML("north"), 100);
p.addSouth(new HTML("south"), 100);
p.addEast(new HTML("east"), 100);
p.addWest(new HTML("west"), 100);
MapWidget map = new MapWidget(LatLng.newInstance(-41.1, 174.8), 5);
p.add(map);
p.layout();
RootLayoutPanel rp = RootLayoutPanel.get();
rp.add(p);
rp.layout();
map.checkResizeAndCenter();
}
John