Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT MAP 3.8 (Google API) - Is onResize() needed to hide the "grey background"?

My problem:
- I display a map inside a popup and I have unloaded tiles (grey background). - If I zoom out or in, then the map will fill the entire space (no grey background anymore).

My question:
- Have you any idea about my problem (Should I need to resize to hide the "grey background") ?
- I do not know if I should call onResize() inside the Runnable callback (code is above) or not ?

Thanks you,

My actual code: (I am using the javaxLoaderAPI)

// ENTRY POINT

  GoogleMap map;
  @UiField LayoutPanel gmap;

  public void AjaxLoader_MAP() {

          AjaxLoaderOptions options = AjaxLoaderOptions.newInstance();

          options.setOtherParms("key=***&sensor=false&language=es");

          Runnable callback = new Runnable() {
             public void run() {
                gmap.onResize();         // Should I call onResize() here  ? 
                map = GoogleMap.create(gmap.getElement());    
             };
          }

          AjaxLoader.loadApi("maps", "3", callback, options);
 }
like image 646
Axel Avatar asked Nov 13 '22 23:11

Axel


1 Answers

May be related to the following post - GWT Google Map Api V3 - broken when changing it

I just posted an answer to that unanswered post as well. I believe it answers and sheds insight on this one as well.

I know this is an old post, but let me know if helps!

like image 191
airtech Avatar answered Apr 20 '23 01:04

airtech