From: Philipp V. <phi...@go...> - 2010-01-13 10:28:30
|
Greetings, I'm trying to use an overview map with a different maplayer than shown in the map window. But I have problems integrating the overview map layer. Here is some code: // Set up the WMS which extends Layer WMSParams wmsParams = new WMSParams(); wmsParams.setFormat("image/png"); wmsParams.setIsTransparent(true); wmsParams.setLayers("basic"); wmsParams.setStyles("default"); wmsParams.setMaxExtent(new Bounds(90, 0, 120, 20)); WMSOptions wmsLayerParams = new WMSOptions(); wmsLayerParams.setIsBaseLayer(false); wmsLayerParams.setLayerOpacity(1.0); WMS wmsLayer = new WMS("basic", "http://labs.metacarta.com/wms/vmap0 ", wmsParams, wmsLayerParams); OverviewMapOptions options = new OverviewMapOptions(); Layer[] layers = new Layer[1]; layers[0] = (Layer)wmsLayer; options.setLayers(layers); map.getMap().addControl(new OverviewMap(options)); Anyone knows whats wrong with the code? Cheers, Philipp |