parttio / Google-Maps-for-Vaadin

Google Maps add-on for Vaadin 7, based on Google Maps API version 3
Apache License 2.0
5 stars 7 forks source link

Failed to load the widgetset #11

Open objectprogr opened 6 years ago

objectprogr commented 6 years ago

Hi, I have a trouble with displaying google map. GoogleMaps.class

@Widgetset("com.vaadin.v7.Vaadin7WidgetSet")
public class GoogleMaps extends UI
{
String apiKey = "xxxx";
    VerticalLayout layout = new VerticalLayout();
    GoogleMapMarker kakolaMarker = new GoogleMapMarker();
    GoogleMap googleMap = new GoogleMap(apiKey, null, "english");

    @Override
    protected void init(VaadinRequest request)
    {    
//        googleMap.setSizeFull();
        googleMap.setWidth("1000");
        googleMap.setHeight("1000");
        googleMap.setMinZoom(4);
        googleMap.setMaxZoom(16);
        layout.addComponent(googleMap);
        setContent(layout);
    }
}

And after run my app, I get this error: Failed to load the widgetset: ./VAADIN/widgetsets/com.vaadin.v7.Vaadin7WidgetSet/com.vaadin.v7.Vaadin7WidgetSet.nocache.js?1521722356809

samie commented 6 years ago

Which Vaadin version? Using Maven? I don't think you need the @Widgetset annotation, but you should do a Maven build (mvn package or mvn install) to make sure a widgetset is generated for you.

objectprogr commented 6 years ago

Vaadi 8.3.1 , I use gradle. If I use gradle, it I must use mvn package or mvn install? Gradle dependencies:

    compile "com.vaadin:vaadin-client:${vaadin}"
    compile "com.vaadin:vaadin-push:${vaadin}"
    compile "com.vaadin:vaadin-sass-compiler:0.9.13"
    compile "com.vaadin:vaadin-spring-boot-starter:${vaadinSpring}"
    compile "com.vaadin.tapio:googlemaps:${vaadinMaps}"
    compile "org.vaadin.spring.addons:vaadin-spring-addon-sidebar:$vaadinSideBar"
    compile "com.vaadin:vaadin-spring:${vaadinSpring}"
    compile "com.vaadin:vaadin-themes:${vaadin}"
    compile "com.vaadin:vaadin-client-compiled:${vaadin}"

If I dont use @WidgetSet annotation, it I get error: Widgetset 'com.vaadin.DefaultWidgetSet' does not contain an implementation for com.vaadin.tapio.googlemaps.GoogleMap. Check the connector's @Connect mapping, the widgetset's 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

objectprogr commented 6 years ago

Nobody can help me?

objectprogr commented 6 years ago

How to should look the Widgetset?