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,