本文整理汇总了Java中org.gwtopenmaps.openlayers.client.layer.WMS类的典型用法代码示例。如果您正苦于以下问题:Java WMS类的具体用法?Java WMS怎么用?Java WMS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WMS类属于org.gwtopenmaps.openlayers.client.layer包,在下文中一共展示了WMS类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: WMSGetFeatureInfo
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的package包/类
public Control WMSGetFeatureInfo(final WMS layer) {
final WMSGetFeatureInfoOptions wmsGetFeatureInfoOptions = new WMSGetFeatureInfoOptions();
wmsGetFeatureInfoOptions.setMaxFeaturess(50);
wmsGetFeatureInfoOptions.setDrillDown(true);
if(layer != null) {
final List<WMS> layers = new ArrayList<WMS>();
layers.add(layer);
wmsGetFeatureInfoOptions.setTitle(layer.getName());
wmsGetFeatureInfoOptions.setLayers(layers.toArray(new WMS[]{}));
}
final WMSGetFeatureInfo wmsGetFeatureInfo = new WMSGetFeatureInfo(
wmsGetFeatureInfoOptions);
wmsGetFeatureInfo.addGetFeatureListener(getFeatureInfoListener());
return wmsGetFeatureInfo;
}
示例2: getLayer
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的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;
}
示例3: setWMSLayer
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的package包/类
public void setWMSLayer(final WMS layer) {
this.layer = layer;
setEnabled(true);
final List<Control> toDelete = new ArrayList<Control>();
final List<Control> toInsert = new ArrayList<Control>();
for (final Control control : controls) {
if (control instanceof WMSGetFeatureInfo) {
toDelete.add(control);
final Control newControl = ((WmsGetInfoTool) this)
.WMSGetFeatureInfo(layer);
toInsert.add(newControl);
} else {
Info.display(UIMessages.INSTANCE.warning(),
"No implemented yet!!! " + control.getClassName());
}
}
updateControl(toDelete, toInsert);
}
示例4: addBaseLayer
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的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);
}
示例5: initializeWMSLayer
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的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);
}
示例6: initMapWidget
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的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();
}
示例7: WmsDetails
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的package包/类
public WmsDetails(String wmsUrl, WMS wms, WMSParams wmsParameters, boolean queryable,
boolean downloadable, boolean multipleElevations, boolean multipleTimes) {
if (wms == null || wmsParameters == null || wmsUrl == null)
throw new IllegalArgumentException("Cannot provide null parameters");
this.wmsUrl = wmsUrl;
this.wms = wms;
this.params = wmsParameters;
this.queryable = queryable;
this.downloadable = downloadable;
this.multipleElevations = multipleElevations;
this.multipleTimes = multipleTimes;
}
示例8: onChange
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的package包/类
@Override
public void onChange(final WMS layer) {
setWMSLayer(layer);
}
示例9: onChange
import org.gwtopenmaps.openlayers.client.layer.WMS; //导入依赖的package包/类
public void onChange(WMS layer);