当前位置: 首页>>代码示例>>Java>>正文


Java WMSOptions类代码示例

本文整理汇总了Java中org.gwtopenmaps.openlayers.client.layer.WMSOptions的典型用法代码示例。如果您正苦于以下问题:Java WMSOptions类的具体用法?Java WMSOptions怎么用?Java WMSOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WMSOptions类属于org.gwtopenmaps.openlayers.client.layer包,在下文中一共展示了WMSOptions类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLayer

import org.gwtopenmaps.openlayers.client.layer.WMSOptions; //导入依赖的package包/类
@Override
public Layer getLayer() {
	WMSParams wmsParams = new WMSParams();
	wmsParams.setFormat(format);
	wmsParams.setLayers(layerName);
	wmsParams.setTransparent(true);		
	
	WMSOptions wmsLayerParams = new WMSOptions();
	wmsLayerParams.setProjection(epsg);
	wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE);
	wmsLayerParams.setDisplayOutsideMaxExtent(true);			
	wmsLayerParams.setNumZoomLevels(GeoMapInitializer.MAX_NUM_ZOOM_LEVEL);
	wmsLayerParams.setIsBaseLayer(true);
	String attribution = getAttribution();
	if(attribution != null) {
		wmsLayerParams.setAttribution(attribution);
	}
	
	WMS wmsLayer = new WMS(getName(), url, wmsParams, wmsLayerParams);
	wmsLayer.setIsBaseLayer(false);

	return wmsLayer;	
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:24,代码来源:WmsLayerDef.java

示例2: addBaseLayer

import org.gwtopenmaps.openlayers.client.layer.WMSOptions; //导入依赖的package包/类
/**
 *
 */
private void addBaseLayer()
{

	GeofenceGlobalConfiguration geoFenceConfiguration = (GeofenceGlobalConfiguration) GeofenceUtils.getInstance().getGlobalConfiguration();
	
    /* base layer */
    WMSParams wmsParams = new WMSParams();
    wmsParams.setLayers(geoFenceConfiguration.getBaseLayerName());
    wmsParams.setFormat(geoFenceConfiguration.getBaseLayerFormat());
    wmsParams.setStyles(geoFenceConfiguration.getBaseLayerStyle());

    WMSOptions wmsLayerParams = new WMSOptions();
    wmsLayerParams.setTransitionEffect(TransitionEffect.RESIZE);

    WMS layer = new WMS(geoFenceConfiguration.getBaseLayerTitle(),
    		geoFenceConfiguration.getBaseLayerURL(), wmsParams, wmsLayerParams);
    Dispatcher.forwardEvent(GeoGWTEvents.ADD_LAYER, layer);
}
 
开发者ID:geoserver,项目名称:geofence,代码行数:22,代码来源:AppView.java

示例3: initializeWMSLayer

import org.gwtopenmaps.openlayers.client.layer.WMSOptions; //导入依赖的package包/类
private WMS initializeWMSLayer(String url) {
    PropertiesManager properties = getPropertiesManager();
    defaultMapOptions.setProjection(DISPLAY_PROJECTION);
    currentMapProjection = DISPLAY_PROJECTION;

    String format = properties.getParameterAsString("wmsFormat");
    String styles = properties.getParameterAsString("wmsStyles");
    String layer = properties.getParameterAsString("wmsLayerName");
    String bgColor = properties.getParameterAsString("wmsBGColor");
    String isTransparent = properties.getParameterAsString("wmsIsTransparent");

    WMSParams wmsParameters = new WMSParams();
    wmsParameters.setFormat(format);
    wmsParameters.setLayers(layer);
    wmsParameters.setStyles(styles);
    wmsParameters.setIsTransparent(new Boolean(isTransparent));
    wmsParameters.getJSObject().setProperty("BGCOLOR", bgColor);

    WMSOptions wmsOptions = new WMSOptions();
    wmsOptions.setProjection(spatialReference);
    wmsOptions.setDisplayInLayerSwitcher(true);
    wmsOptions.setIsBaseLayer(true);
    return new WMS(layer, url, wmsParameters, wmsOptions);
}
 
开发者ID:52North,项目名称:SensorWebClient,代码行数:25,代码来源:OpenLayersMapWrapper.java

示例4: initMapWidget

import org.gwtopenmaps.openlayers.client.layer.WMSOptions; //导入依赖的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

示例5: getOptionsForCurrentProjection

import org.gwtopenmaps.openlayers.client.layer.WMSOptions; //导入依赖的package包/类
protected WMSOptions getOptionsForCurrentProjection() {
    if (currentProjection.equalsIgnoreCase("EPSG:32661")
            || currentProjection.equalsIgnoreCase("EPSG:5041")) {
        return wmsNorthPolarOptions;
    } else if (currentProjection.equalsIgnoreCase("EPSG:32761")
            || currentProjection.equalsIgnoreCase("EPSG:5042")) {
        return wmsSouthPolarOptions;
    } else if (currentProjection.equalsIgnoreCase("EPSG:3857")
            || currentProjection.equalsIgnoreCase("EPSG:900913")) {
        return wmsWebMercOptions;
    } else {
        return wmsStandardOptions;
    }
}
 
开发者ID:Reading-eScience-Centre,项目名称:edal-java,代码行数:15,代码来源:MapArea.java

示例6: MapArea

import org.gwtopenmaps.openlayers.client.layer.WMSOptions; //导入依赖的package包/类
public MapArea(int width, int height, final GodivaActionsHandler godivaListener,
        String proxyUrl, FixedLayerDetails... additionalLayers) {
    super(width + "px", height + "px", getDefaultMapOptions());

    if (proxyUrl == null) {
        this.proxyUrl = "";
    } else {
        this.proxyUrl = proxyUrl;
    }

    wmsLayers = new LinkedHashMap<>();
    overLayers = new HashMap<>();
    converters = new HashMap<>();

    /*
     * Define some listeners to handle layer start/end loading events
     */
    loadStartListener = new LayerLoadStartListener() {
        @Override
        public void onLoadStart(LoadStartEvent eventObject) {
            godivaListener.setLoading(true);
        }
    };
    loadCancelListener = new LayerLoadCancelListener() {
        @Override
        public void onLoadCancel(LoadCancelEvent eventObject) {
            godivaListener.setLoading(false);
        }
    };
    loadEndListener = new LayerLoadEndListener() {
        @Override
        public void onLoadEnd(LoadEndEvent eventObject) {
            godivaListener.setLoading(false);
        }
    };
    this.widgetDisabler = godivaListener;
    init(additionalLayers);
    map.addMapMoveListener(godivaListener);
    map.addMapZoomListener(godivaListener);

    wmsStandardOptions = new WMSOptions();
    wmsStandardOptions.setWrapDateLine(true);
    wmsStandardOptions.setTransitionEffect(TransitionEffect.RESIZE);
}
 
开发者ID:Reading-eScience-Centre,项目名称:edal-java,代码行数:45,代码来源:MapArea.java


注:本文中的org.gwtopenmaps.openlayers.client.layer.WMSOptions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。