我在 Sencha 中使用了 v.1.1.0 和 Java GWT。在寻找 OSM 的示例后,我得到了这个错误。$wnd.OpenLayers.Layer.OSM.CycleMap 不是构造函数。我在我的 html 中添加了
MapOptions osmOption = new org.gwtopenmaps.openlayers.client.MapOptions();
osmOption.setNumZoomLevels(16);
mapWidgetOSM = new MapWidget("100%", "100%", osmOption);
OSM osm1 = OSM.Mapnik("Mapnik");
osm1.setIsBaseLayer(true);
org.gwtopenmaps.openlayers.client.Map mapOSM = mapWidgetOSM.getMap();
mapOSM.addLayer(osm1);
mapOSM.addControl(new OverviewMap());
LonLat lonLat = new LonLat(-0.7894612, 113.9209709);
lonLat.transform(DEFAULT_PROJECTION.getProjectionCode(), mapOSM.getProjection());
mapOSM.setCenter(lonLat, 12);
rootContainer.setCenterWidget(mapWidgetOSM, new MarginData());
有人有什么建议吗??