On Jan 26, 1:41 pm, Sudhir <[email protected]> wrote: > I've got a map in a GWT app up athttp://corn.appspot.com- I want the > map to cover 100% of the height and width of its container. I'm doing > this by adding it into a layout panel and not assigning a size, like > so: > > LatLng cawkerCity = LatLng.newInstance(39.509, -98.434); > MapOptions options = MapOptions.newInstance(); > MapWidget map = new MapWidget(cawkerCity, 2, options); > map.setUIToDefault(); > map.addOverlay(new Marker(cawkerCity)); > mapHolder.add(map); > > The problem is that the map displays a small version in the area, then > rights itself as soon as you try to change the size of the browser > window in any way. Again, if anyone wants to take a look its up at > corn.appspot.com. Just change the size of the window in any way to see > the map set itself right.
Doesn't ever set itself right in IE6... > > Does anyone have any idea why that would happen? The browser doesn't report the size of the window correctly to the API. This is a common problem with using percentages to size the map div. Mike Williams has documented a work around in his tutorial (whether you can use it with GWT or not, I can't say): Part 20 Using a percentage height for the map div http://econym.org.uk/gmap/basic19.htm Another possibility is to use GMap2.checkResize() after the page has been rendered, but I don't hold much hope for that. -- Larry -- You received this message because you are subscribed to the Google Groups "Google Maps API" 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-maps-api?hl=en.
