使用“gwt-maps-3.8.0”触发从GWT 2.5重新调整Google地图的事件大小 [英] trigger resize Event to Google Maps from GWT 2.5 using "gwt-maps-3.8.0"

查看:106
本文介绍了使用“gwt-maps-3.8.0”触发从GWT 2.5重新调整Google地图的事件大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 gwt-maps-3.8.0 lib GWT-Maps 和i我无法触发调整大小。



- >尝试使用import com.google.gwt.user.client.Event; - > Event.trigger(mapWidget,resize); 方法触发器(谷歌地图,字符串)未定义类型事件



(这是从这里开始的后续行动:谷歌地图的第二次调用不会显示大小正确的地图

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


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)

解决方案

That's the best I found so far:

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

这篇关于使用“gwt-maps-3.8.0”触发从GWT 2.5重新调整Google地图的事件大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆