Java 如何将vaadin 7与Google地图连接

Java 如何将vaadin 7与Google地图连接,java,google-maps,vaadin,Java,Google Maps,Vaadin,我使用com.vaadin.tapio.googlemaps.GoogleMap组件从vaadin连接到Google地图 我尝试了以下代码。(Vaadin 7.0.2) 但运行时会出现以下错误。我在pom中添加了依赖项 Widgetset does not contain implementation for com.vaadin.tapio.googlemaps.GoogleMap. Check its component connector's @Connect mapping, widge

我使用com.vaadin.tapio.googlemaps.GoogleMap组件从vaadin连接到Google地图

我尝试了以下代码。(Vaadin 7.0.2)

但运行时会出现以下错误。我在pom中添加了依赖项

Widgetset does not contain implementation for com.vaadin.tapio.googlemaps.GoogleMap. Check its component connector's @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.
在我的web.xml中,我定义了小部件集,如下所示

 <init-param>
        <param-name>widgetset</param-name>
        <param-value>com.client.DashboardWidgetSet</param-value>
    </init-param>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
    <inherits name="com.vaadin.DefaultWidgetSet" />

    <inherits name="org.vaadin.cssinject.Cssinject_addonWidgetset" />
    <!--  -->

    <set-configuration-property name="devModeRedirectEnabled"
        value="true" />

    <!-- Uncomment the following to compile the widgetset for one browser only. 
        This can reduce the GWT compilation time significantly when debugging. The 
        line should be commented out before deployment to production environments. 
        Multiple browsers can be specified for GWT 1.7 as a comma separated list. 
        The supported user agents at the moment of writing were: ie6,ie8,gecko,gecko1_8,safari,opera 
        The value gecko1_8 is used for Firefox 3 and later and safari is used for 
        webkit based browsers including Google Chrome. -->
    <!-- <set-property name="user.agent" value="safari"/> -->

    <!-- WidgetSetOptimizer -->

    <inherits name="org.vaadin.easyuploads.Widgetset" />

    <inherits name="com.vaadin.tapio.googlemaps.WidgetSet" />

</module>

widgetset
com.client.DashboardWidgetSet
我的仪表板设置如下

 <init-param>
        <param-name>widgetset</param-name>
        <param-value>com.client.DashboardWidgetSet</param-value>
    </init-param>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
    <inherits name="com.vaadin.DefaultWidgetSet" />

    <inherits name="org.vaadin.cssinject.Cssinject_addonWidgetset" />
    <!--  -->

    <set-configuration-property name="devModeRedirectEnabled"
        value="true" />

    <!-- Uncomment the following to compile the widgetset for one browser only. 
        This can reduce the GWT compilation time significantly when debugging. The 
        line should be commented out before deployment to production environments. 
        Multiple browsers can be specified for GWT 1.7 as a comma separated list. 
        The supported user agents at the moment of writing were: ie6,ie8,gecko,gecko1_8,safari,opera 
        The value gecko1_8 is used for Firefox 3 and later and safari is used for 
        webkit based browsers including Google Chrome. -->
    <!-- <set-property name="user.agent" value="safari"/> -->

    <!-- WidgetSetOptimizer -->

    <inherits name="org.vaadin.easyuploads.Widgetset" />

    <inherits name="com.vaadin.tapio.googlemaps.WidgetSet" />

</module>


非常感谢您的帮助。

您需要确保web.xml中的widgetset init参数指向正确的widgetset。默认设置不包含有关Google Map组件小部件的任何信息。

在将附加依赖项添加到pom后,您是否重新编译widgetset?是的,我重新编译了。您可以创建一个测试项目来隔离问题吗?也许是在github?嗨Jonas,我在我的帖子中添加了我的init参数。至少不能立即发现任何奇怪的东西。widgetset编译没有错误吗?尝试向widgetset编译器参数添加-pretty,以确保它不会跳过任何可能的错误。