本文整理汇总了Java中org.gwtopenmaps.openlayers.client.MapOptions类的典型用法代码示例。如果您正苦于以下问题:Java MapOptions类的具体用法?Java MapOptions怎么用?Java MapOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MapOptions类属于org.gwtopenmaps.openlayers.client包,在下文中一共展示了MapOptions类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createMapOption
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
/**
* Creates the map option.
*
* @param isGoogle
* the is google
*/
private void createMapOption(boolean isGoogle)
{
// TODO Auto-generated method stub
OpenLayers.setProxyHost("gwtOpenLayersProxy?targetURL=");
this.defaultMapOptions = new MapOptions();
this.defaultMapOptions.setNumZoomLevels(18);
if (isGoogle)
{
this.defaultMapOptions.setProjection("EPSG:900913");
this.defaultMapOptions.setDisplayProjection(new Projection("EPSG:4326"));
this.defaultMapOptions.setUnits(MapUnits.METERS);
this.defaultMapOptions.setMaxExtent(new Bounds(-20037508, -20037508, 20037508,
20037508.34));
this.defaultMapOptions.setMaxResolution(new Double(156543.0339).floatValue());
}
else
{
this.defaultMapOptions.setProjection("EPSG:4326");
}
initMapWidget(this.defaultMapOptions, isGoogle);
}
开发者ID:geoserver,项目名称:geofence,代码行数:31,代码来源:MapPreviewWidget.java
示例2: addMapControls
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
@Override
protected void addMapControls(MapOptions mapOptions) {
super.addMapControls(mapOptions);
MousePositionOptions options = new MousePositionOptions();
options.setFormatOutput(new MousePositionOutput() {
@Override
public String format(LonLat lonLat, Map map) {
lonLat.transform(getMapProjection(), EPSG_4326);
StringBuilder sb = new StringBuilder();
sb.append("Lon: ").append(lonLat.lon()).append(", ");
sb.append("Lat: ").append(lonLat.lat());
sb.append(" (").append(map.getProjection()).append(")");
return sb.toString();
}
});
map.addControl(new MousePosition(options));
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:20,代码来源:StationSelectorMap.java
示例3: configure
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
public void configure(final Projection displayProjection, final Integer numZoomLevels, final String units) {
this.displayProjection = displayProjection;
mapOptions = new MapOptions();
mapOptions.setDisplayProjection(this.displayProjection);
mapOptions.setNumZoomLevels(numZoomLevels);
mapOptions.setUnits(units);
mapOptions.setMaxExtent(getDefaultMapBound());
mapOptions.setMaxResolution(appClientProperties.getFloatValue("maxResolution"));
getMap().setOptions(mapOptions);
getMap().setMinMaxZoomLevel(0, 20);
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:13,代码来源:GeoMap.java
示例4: configure
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
public void configure(final Projection displayProjection, final Integer numZoomLevels, final String units) {
this.displayProjection = displayProjection;
mapOptions = new MapOptions();
mapOptions.setDisplayProjection(this.displayProjection);
mapOptions.setNumZoomLevels(numZoomLevels);
mapOptions.setUnits(units);
mapOptions.setMaxExtent(getDefaultMapBound());
mapOptions.setMaxResolution(appClientProperties.getFloatValue("maxResolution"));
getMap().setOptions(mapOptions);
getMap().setMinMaxZoomLevel(0, 50);
}
开发者ID:geowe,项目名称:geowe-core,代码行数:13,代码来源:GeoMap.java
示例5: initMapWidget
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的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
示例6: init
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的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
示例7: getDefaultMapOptions
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
protected static MapOptions getDefaultMapOptions() {
MapOptions mapOptions = new MapOptions();
mapOptions.setProjection("CRS:84");
mapOptions.setDisplayProjection(CRS84);
mapOptions.removeDefaultControls();
mapOptions.setControls(new JObjectArray(new JSObject[0]));
JSObject vendorParams = JSObject.createJSObject();
vendorParams.setProperty("theme", GWT.getModuleBaseURL() + "theme/default/style.css");
mapOptions.setJSObject(vendorParams);
return mapOptions;
}
开发者ID:Reading-eScience-Centre,项目名称:edal-java,代码行数:12,代码来源:MapArea.java
示例8: addMapControls
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
@Override
protected void addMapControls(MapOptions mapOptions) {
// FIXME does not work .. navigation panel is still drawn
mapOptions.removeDefaultControls();
map.addControl(new ZoomIn());
map.addControl(new ZoomOut());
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:8,代码来源:OverviewMap.java
示例9: GeoMap
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的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
示例10: getMapOptions
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
public MapOptions getMapOptions() {
return mapOptions;
}
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:4,代码来源:GeoMap.java
示例11: initializeMap
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的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
示例12: getDefaultMapOptions
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
public MapOptions getDefaultMapOptions() {
return defaultMapOptions;
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:4,代码来源:OpenLayersMapWrapper.java
示例13: setDefaultMapOptions
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
public void setDefaultMapOptions(MapOptions defaultMapOptions) {
this.defaultMapOptions = defaultMapOptions;
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:4,代码来源:OpenLayersMapWrapper.java
示例14: addMapControls
import org.gwtopenmaps.openlayers.client.MapOptions; //导入依赖的package包/类
/**
* Override, if you want custom controls on the map. Per default the {@link Navigation} control is added
* only.
*
* @param mapOptions
* the map options where to set the map controls
*/
protected void addMapControls(MapOptions mapOptions) {
mapOptions.removeDefaultControls();
map.addControl(new Navigation());
}
开发者ID:52North,项目名称:SensorWebClient,代码行数:12,代码来源:OpenLayersMapWrapper.java
注:本文中的org.gwtopenmaps.openlayers.client.MapOptions类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论