Bingo Guillem! Thanks.
On Aug 28, 2:35 pm, Einstein0970 <[EMAIL PROTECTED]> wrote:
> Thanks Guys, the map.checkResize(); solved my poblem too.
>
> - Erick
>
> On Jul 24, 11:59 am, Guillem <[EMAIL PROTECTED]> wrote:
>
> > I don't know if you already fixed this, but I'll share what I've
> > found.
>
> > In my app, I add MapWidgets at runtime, all with setVisible(false).
> > By clicking on a link, you can show or hide any of the MapWidgets, but
> > all
> > MapWidgets added this way were having the same problem you report.
> > What I did to fix this is to add a checkResize() call after
> > setVisible(true).
> > This solved the problem.
>
> > Example:
>
> > final MapWidget map = new MapWidget();
> > map.setVisible(false);
>
> > Button b = new Button("Show", new ClickListener(){
> > public void onClick(Widget arg0) {
> > map.setVisible(true);
> > map.checkResize();
> > }
>
> > });
>
> > RootPanel.get().add(map);
> > RootPanel.get().add(b);
> > Hope this helps.
>
> > On 24 jul, 12:43, LFCPD <[EMAIL PROTECTED]> wrote:
>
> > > I center the map when I create the markers. In the application there
> > > are some markers stored in the DB, and for each one I create a marker
> > > like this:
>
> > > long lat = ...
> > > long lng = .... //lat and lng are from each point stored in DB
>
> > > final LatLng point = new LatLng(lat, lng);
> > > Marker marker = new Marker(point);
> > > map.addOverlay(marker);
> > > map.setCenter(point);
> > > marker.addClickListener(new MarkerClickListener()
> > > {
> > > public void onClick(Marker sender) {
> > > map.setCenter(point);
> > > map.getInfoWindow().open(point, new
> > > InfoWindowContent("Endpoint IP:
> > > " + ip + ". GC: " + gc));
> > > }
> > > });
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---