tr...">

Trigger to resize event on Google Maps with GWT 2.5 using "gwt-maps-3.8.0"

Using gwt-maps-3.8.0 lib GWT-Maps , and I cannot call the size.

-> tried using "import com.google.gwt.user.client.Event;" β†’ Event.trigger(mapWidget,"resize"); "Method trigger (GoogleMap, String) undefined for type Event"

(this is the following: the second call to Google maps does not display the map in the correct size )

+1
source share
2 answers

This is the best I have found so far:

 private final native void resizeMap(GoogleMap map) /*-{ $wnd.google.maps.event.trigger(map, 'resize'); }-*/; 
+2
source

If you do not want to use your own nativ JS code, you can simply use the mapWidget.getMap().triggerResize() method provided by the gwt-maps-3.8.0 library

+2
source

Source: https://habr.com/ru/post/1345495/


All Articles