Re: GWT MAP 3.8 (Google API) - Related onResize() problem ?
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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home