本文整理汇总了Java中org.gwtopenmaps.openlayers.client.MapWidget类的典型用法代码示例。如果您正苦于以下问题:Java MapWidget类的具体用法?Java MapWidget怎么用?Java MapWidget使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MapWidget类属于org.gwtopenmaps.openlayers.client包,在下文中一共展示了MapWidget类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initMapWidget
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
/**
* Inits the map widget.
*
* @param defaultMapOptions
* the default map options
* @param isGoogle
* the is google
*/
private void initMapWidget(MapOptions defaultMapOptions, boolean isGoogle)
{
mapWidget = new MapWidget("100%", "100%", defaultMapOptions);
this.map = mapWidget.getMap();
// this.map.addControl(new LayerSwitcher());
if (isGoogle)
{
this.createOSM();
// this.createBaseGoogleLayer();
}
else
{
WMSParams wmsParams = new WMSParams();
wmsParams.setFormat("image/png");
wmsParams.setLayers("basic");
wmsParams.setStyles("");
WMSOptions wmsLayerParams = new WMSOptions();
wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE);
layer = new WMS("Basic WMS", "http://labs.metacarta.com/wms/vmap0", wmsParams,
wmsLayerParams);
this.map.addLayer(layer);
}
this.initVectorLayer();
}
开发者ID:geoserver,项目名称:geofence,代码行数:36,代码来源:MapPreviewWidget.java
示例2: init
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
@Override
protected void init() {
mapWidget = new MapWidget("100%", "100%", new MapOptions());
// Humanitarian layer
final OSMOptions hotOption = new OSMOptions();
hotOption.setIsBaseLayer(true);
hotOption.crossOriginFix();
hotOption.setSphericalMercator(true);
XYZ HOTLayer = new XYZ(I18N.CONSTANTS.humanitarianOSMLayer(), "http://a.tile.openstreetmap.fr/hot/${z}/${x}/${y}.png", hotOption);
// Basic layer
OSM osmMapnik = new OSM();
osmMapnik.setName(I18N.CONSTANTS.basicOSMLayer());
osmMapnik.setIsBaseLayer(true);
// Pin layer
vectorLayer = new Vector(I18N.CONSTANTS.projectSitesLayer());
// Drag & drop listeners
dragFeature = createDraggableFeature(vectorLayer);
// Center & zoom
LonLat lonLat = new LonLat(0, 0);
lonLat.transform(TRANSFORM_SOURCE, mapWidget.getMap().getProjection());
mapWidget.getMap().addLayer(HOTLayer);
mapWidget.getMap().addLayer(osmMapnik);
mapWidget.getMap().addLayer(vectorLayer);
mapWidget.getMap().addControl(new LayerSwitcher());
mapWidget.getMap().setCenter(lonLat, 1);
mapWidget.getMap().updateSize();
getRoot().add(mapWidget);
setInitialized(true);
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:38,代码来源:OpenStreetMapWorldMap.java
示例3: GeoMap
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
public GeoMap() {
final MapOptions defaultMapOptions = new MapOptions();
defaultMapOptions.removeDefaultControls();
mapWidget = new MapWidget("100%", "100%", defaultMapOptions);
getMap().addControl(navHistory);
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:7,代码来源:GeoMap.java
示例4: getMapWidget
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
public MapWidget getMapWidget() {
return mapWidget;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:4,代码来源:GeoMap.java
示例5: initializeMap
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
/**
* <p>initializeMap</p>
*/
private void initializeMap() {
final MapOptions mo = new MapOptions();
mo.setProjection(PROJECTION_SPHERICAL_MERCATOR.getProjectionCode());
mo.setDisplayProjection(PROJECTION_LAT_LON);
mo.setMaxExtent(new Bounds(-180, -90, 180, 90).transform(PROJECTION_LAT_LON,PROJECTION_SPHERICAL_MERCATOR));
m_mapWidget = new MapWidget("100%", "100%", mo);
m_mapHolder.add(m_mapWidget);
m_map = m_mapWidget.getMap();
m_map.addControl(new PanZoomBar());
m_map.addControl(new MousePosition());
m_map.zoomTo(2);
initializeImageError();
XYZOptions xyzOptions = new XYZOptions();
xyzOptions.setSphericalMercator(true);
xyzOptions.setAttribution("Default tiles courtesy of <a href=\"http://open.mapquest.co.uk/\">MapQuest</a>");
XYZ x = new XYZ("OpenStreetMap", getLayerUrl(), xyzOptions);
x.setIsBaseLayer(true);
x.setIsVisible(true);
m_map.addLayer(x);
m_markersLayer = new Markers("Remote Pollers");
m_markersLayer.setIsVisible(true);
m_markersLayer.setIsBaseLayer(false);
m_map.addLayer(m_markersLayer);
/*
final LayerSwitcher switcher = new LayerSwitcher();
m_map.addControl(switcher);
*/
m_map.zoomToMaxExtent();
Window.addResizeHandler(new ResizeHandler() {
public void onResize(ResizeEvent event) {
syncMapSizeWithParent();
}
});
}
开发者ID:qoswork,项目名称:opennmszh,代码行数:45,代码来源:OpenLayersMapPanel.java
示例6: createMapContent
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
private MapWidget createMapContent() {
return controller.createMap();
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:4,代码来源:StationSelector.java
示例7: createMap
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
public MapWidget createMap() {
return map.getMapWidget();
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:4,代码来源:StationSelectorController.java
示例8: createMapContent
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
private MapWidget createMapContent() {
OverviewMapController controller = new OverviewMapController();
return controller.createMap(); // TODO refactor
// return new LegendMap().getLayout();
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:7,代码来源:Legend.java
示例9: createMap
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
public MapWidget createMap() {
return map.getMapWidget();
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:4,代码来源:OverviewMapController.java
示例10: initializeMapWidget
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
private void initializeMapWidget(String cssHeight) {
initializeDefaultMapOptions();
mapWidget = new MapWidget("100%", cssHeight, defaultMapOptions);
map = mapWidget.getMap();
addMapControls(defaultMapOptions);
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:7,代码来源:OpenLayersMapWrapper.java
示例11: getMapWidget
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
public MapWidget getMapWidget() {
return mapWidget;
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:4,代码来源:OpenLayersMapWrapper.java
示例12: setMapWidget
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
public void setMapWidget(MapWidget mapWidget) {
this.mapWidget = mapWidget;
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:4,代码来源:OpenLayersMapWrapper.java
示例13: getMapWidget
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
/**
* Gets the map widget.
*
* @return the map widget
*/
public MapWidget getMapWidget()
{
return mapWidget;
}
开发者ID:geoserver,项目名称:geofence,代码行数:10,代码来源:MapPreviewWidget.java
示例14: createMap
import org.gwtopenmaps.openlayers.client.MapWidget; //导入依赖的package包/类
public MapWidget createMap();
开发者ID:52North,项目名称:SensorWebClient,代码行数:2,代码来源:MapController.java
注:本文中的org.gwtopenmaps.openlayers.client.MapWidget类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论