Reputation: 152
Using gwt-maps-3.8.0 lib GWT-Maps and i am not able to trigger a resize.
-> tried using "import com.google.gwt.user.client.Event;" -> Event.trigger(mapWidget,"resize");
"The method trigger(GoogleMap, String) is undefined for the type Event"
(this is the follow up from here: second call of google maps does not show the map in correct size)
Upvotes: 1
Views: 1495
Reputation: 1154
If you don't want to use your own nativ JS code you could just use the mapWidget.getMap().triggerResize()
method provided by the gwt-maps-3.8.0 library
Upvotes: 2
Reputation: 4146
That's the best I found so far:
private final native void resizeMap(GoogleMap map) /*-{
$wnd.google.maps.event.trigger(map, 'resize');
}-*/;
Upvotes: 2