I had the same problem. This timer suggestion fixed it for me (though I still wonder if it's raceable):
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/3cc67a8e3b4b76a7/5b3c0b9f95875957?lnk=gst&q=layouts+maps#5b3c0b9f95875957 On Feb 4, 2:03 am, ahhughes <[email protected]> wrote: > Hi All, > > I suspect this is an easy one, sorry I can't find the answer. > > Adding a MapWidget directly to the RootPanel().get().add() works! But > if I add my MapWidget into a TabPanel then the map tile/layers aren't > where they are supposed to be. I have grey "background" visible where > tile's should be, and the maps is probably aligning itself to 0,0. I > have also tried to wrap this in an AbsolutePanel with no success. > > Here's my code: > public class SimpleMapWidget extends Composite { > > public SimpleMapWidget() { > AbsolutePanel absolutePanel = new AbsolutePanel(); > absolutePanel.setWidth("640px"); > absolutePanel.setHeight("480px"); > LatLng latLng = LatLng.newInstance(0, 0); > final MapWidget map = new MapWidget(latLng, 16); > map.setSize("640px", "480px"); > map.addControl(new LargeMapControl()); > map.addOverlay(new Marker(latLng)); > absolutePanel.add(map); > initWidget(absolutePanel); > } > > } > > CHEERS IN ADVANCE :) -- 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.
