Closed GoogleCodeExporter closed 9 years ago
Can you give some more information or some sample code that used to work for
you and
a more complete version of the code that now fails? I've not noticed any
regression
in the HelloMaps sample or tutorials.
I tried:
map = new MapWidget(LatLng.newInstance(38.0, -97.0), 4);
map.setSize("500px", "300px");
Marker m = new Marker(LatLng.newInstance(38.0, -97.0));
map.addOverlay(m);
and the maker was in the dead center of the map.
Original comment by galgwt.reviews@gmail.com
on 15 Dec 2008 at 9:18
I've have a map embedded in a gwt-ext tabbed panel. Worked just fine until I
tried
to upgrade to 1.0.2. Now instead of a map centered on the US, it is centered
somewhere in the Caribbean and the expected center is off the screen towards
upper
left hand corner. My application also displays maps centered on different
states,
and all of them exibit the same behavior.
Basically I'm doing something like:
MapWidget map = new MapWidget(LatLng.newInstance(38.0, -97.0), 4);
map.setSize("100%", "100%");
// add a bunch of markers
Panel mapPanel = new Panel();
mapPanel.setLayout(new FitLayout());
mapPanel.add(map);
mapPanel.addListener(new PanelListenerAdapter() {
public void onAfterLayout(Container self) {
map.checkResize();
}
});
Original comment by raniel...@gmail.com
on 16 Dec 2008 at 3:22
There is something that changed in gwt-maps-1.0.2, and that is that
map.checkResize()
no longer contains an implicit map.setCenter(). You can call
map.checkResizeAndCenter() or add the setCenter() call separately.
First of all, see issue 127, where several gwt-ext issues were discussed.
Original comment by galgwt.reviews@gmail.com
on 16 Dec 2008 at 3:33
map.checkResizeAndCenter() fixed the problem. This issue can be closed.
Original comment by raniel...@gmail.com
on 16 Dec 2008 at 4:25
Original comment by galgwt.reviews@gmail.com
on 16 Dec 2008 at 6:26
I have same problem using gwt query where I initialise the map widget (1.0.4),
append() it to a div and the map center is in top left corner of view pane and
RHS of
map is grey. in other words center is miscalculated.
map.checkResizeAndCenter() after appending to dom fixes problem. Thank you.
Original comment by jolyonbl...@yahoo.com.au
on 11 Aug 2009 at 1:02
Original issue reported on code.google.com by
raniel...@gmail.com
on 15 Dec 2008 at 9:03