只有一个空div出现。这是一个最小例子的代码。 (创建PieChart的类似代码工作正常。)谢谢!
import com.google.gwt.visualization.client.AbstractDataTable.ColumnType;
import com.google.gwt.visualization.client.DataTable;
import com.google.gwt.visualization.client.VisualizationUtils;
import com.google.gwt.visualization.client.visualizations.GeoMap;
import com.google.gwt.visualization.client.visualizations.GeoMap.Options;
VisualizationUtils.loadVisualizationApi(new Runnable() {
public void run() {
setup();
}
}, GeoMap.PACKAGE);
protected void setup() {
final Options options = Options.create();
options.setDataMode(GeoMap.DataMode.MARKERS);
options.setHeight(300);
options.setWidth(450);
options.setShowLegend(false);
options.setColors(0xFF8747, 0xFFB581, 0xc06000);
options.setRegion("world");
final DataTable dataTable = DataTable.create();
dataTable.addRows(2);
dataTable.addColumn(ColumnType.STRING, "Country");
dataTable.addColumn(ColumnType.NUMBER, "Value");
dataTable.setValue(0, 0, "France");
dataTable.setValue(0, 1, 100.0);
dataTable.setValue(0, 0, "US");
dataTable.setValue(0, 1, 200.0);
final GeoMap geo = new GeoMap(dataTable, options);
myPanel.add(geo);
}
答案 0 :(得分:0)
好吧,我的Firefox似乎缺少了GeoMap所需的Flash播放器!