UiBinder Maps

367 views
Skip to first unread message

Nicolas

unread,
Sep 30, 2011, 3:03:48 PM9/30/11
to Google Web Toolkit
Hi I'm trying to use Google Maps in my project so I add
<inherits name='com.google.gwt.maps.GoogleMaps' />
in the gwt.xml file. I use deferred binding for create the UI and the
View.ui.xml file's code is:
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:p1="urn:import:com.google.gwt.user.cellview.client"
xmlns:p2="urn:import:com.google.gwt.maps.client">

<ui:style>
.important {
font-weight: bold;
}
</ui:style>
<g:VerticalPanel ui:field="rootPanel" width="100%" height="100%">
<p2:MapWidget ui:field='map' />
</g:VerticalPanel>
</ui:UiBinder>

The View.java file's code is:
import com.google.gwt.core.client.GWT;
import com.google.gwt.maps.client.MapWidget;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.cellview.client.CellTable;

public class View extends Composite {

private static ViewUiBinder uiBinder = GWT
.create(ViewUiBinder.class);
@UiField VerticalPanel rootPanel;
@UiField MapWidget map;

interface ViewUiBinder extends UiBinder<Widget, View> {
}

public View() {
initWidget(uiBinder.createAndBindUi(this));
}
}

The problem is when i switch from the code view to the design view
elipse show me this error:
Error loading module(s).

GWT Designer can't load a module because of error in gwt.xml module
description, incorrect resource which requires processing with GWT
generator or by some other configuration error.

Please check your $project_dir/.gwt/.gwt-log for GWT-specific errors.

This log has the following error messages:



[ERROR] Failed to create an instance of
'com.google.gwt.maps.client.MapWidget' via deferred binding


Show stack trace.
Hide stack trace.

Stack trace:
org.eclipse.wb.internal.core.utils.exception.DesignerException: 4108
(Error loading module(s).).
[ERROR] Failed to create an instance of
'com.google.gwt.maps.client.MapWidget' via deferred binding.

The Google Maps API's version is gwt-maps-1.1.1-rc1.jar.

I would like to know what I doing wrong.??
Is the Google Maps API version the lastest version??

Thanks.

Miltos Miltiadou

unread,
Mar 22, 2012, 11:31:17 AM3/22/12
to google-we...@googlegroups.com
Hi Nicolas, did you find any solution with this issue. I am facing the same problem. Please post your solution, if you find any!

Thanks Miltos.

Joseph Lust

unread,
Jun 10, 2012, 4:39:59 PM6/10/12
to google-we...@googlegroups.com
FWIW, most more elaborate libraries don't work in the Eclipse designer view. I don't know any developers that use it. Just run in DevMode and use F5 as needed.

Joe
Reply all
Reply to author
Forward
0 new messages