Hi,

Have you tried

MapHandlerRegistration.trigger(mapWidgetInstance, MapEventType.RESIZE);

Where mapWidgetInstance is, as the name implies, your MapWidget object. 
MapHandlerRegistration class can be found in the 
com.google.gwt.maps.client.events package.

/Ulas

Den onsdagen den 22:e augusti 2012 kl. 12:52:27 UTC+10 skrev Axel REGNOULT:
>
> Hello,
>
> *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 solution:*
>
> I think I should call onResize(), isn t it ? ... and I unsuccessfully 
> tried to :
>  - use a LayoutPanel
>  - call the javascript function : 
>
> private final native void resizeMap(GoogleMap map) /*-{
> $wnd.google.maps.event.trigger(map, 'resize');
> }-*/;
>
> I am using the javaxLoaderAPI and have the following code: 
>
>         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);
>      }
>
>
> #1 - Have you any idea about my problem ?  
> #2 - I do not know if I should call onResize() inside the Runnable 
> callback or not ?
>
> Thanks you,
>
>
>
>
>
>
>
>
>
>
>
>
>

-- 
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].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to