witchupan / gwt-maps-api

Automatically exported from code.google.com/p/gwt-maps-api
0 stars 0 forks source link

Off center map surrounded with grey background, after creating a second map widget. #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. load map api and draw map widget

private void loadMapApi() {
        boolean sensor = true;
        ArrayList<LoadLibrary> loadLibraries = new ArrayList<LoadApi.LoadLibrary>();
        loadLibraries.add(LoadLibrary.ADSENSE);
        loadLibraries.add(LoadLibrary.DRAWING);
        loadLibraries.add(LoadLibrary.GEOMETRY);
        loadLibraries.add(LoadLibrary.PANORAMIO);
        loadLibraries.add(LoadLibrary.PLACES);

        Runnable onLoad = new Runnable() {
          public void run() {
            draw();
          }
        };
        LoadApi.go(onLoad, loadLibraries, sensor);
      }
}

private void draw(){
          MapOptions op = MapOptions.newInstance();
          MapWidget mw = new MapWidget(op);
          mw.setSize("600px", "600px");
          LatLng center = LatLng.newInstance(lat,longi);

          VerticalPanel panel = new VerticalPanel();
          op.setZoom(4);
          op.setCenter(center);
          op.setMapTypeId(MapTypeId.HYBRID);
          panel.add(mw);

          RootPanel.get().add(panel);
}

2. implement button, which will draw the map widget a second time 

3. click on button (button click calls draw() method) 

What is the expected output? What do you see instead?
expected: the newly added map should load and display normally
instead: I see the second map off center surrounded with grey background on one 
side. The first map still behaves normally

What version of the product are you using? On what operating system?
gwt 2.4

Please provide any additional information below.

similar issues:
http://code.google.com/p/gwt-google-apis/wiki/MapsFAQ#Why_do_I_see_the_map_off_c
enter_surrounded_with_grey_background

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/3cc67a8e3
b4b76a7/5b3c0b9f95875957?lnk=gst&q=layouts+maps#5b3c0b9f95875957

Original issue reported on code.google.com by ntquan1...@googlemail.com on 28 Mar 2012 at 9:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I'm sorry, just saw that there is already an issue for this problem.
Please delete.

Original comment by ntquan1...@googlemail.com on 28 Mar 2012 at 1:09