Revision 1430 org.gvsig.raster.wms/trunk/org.gvsig.raster.wms/org.gvsig.raster.wms.app/org.gvsig.raster.wms.app.wmsclient/src/main/java/org/gvsig/raster/wms/app/wmsclient/gui/panel/WMSParamsPanel.java

View differences:

WMSParamsPanel.java
992 992
		for (int i = 0; i < layerNames.length; i++) {
993 993
			layerNames[i] = layers[i].getName();
994 994
		}
995
		// Boundingbox de todas las capas
996
		// ArrayList rectangulos = new ArrayList();
997

  
998
		Rectangle2D rect;
999
		String latLonID;
1000

  
1001
		rect = explorer.getBoundingBox(layerNames, getSRS());
1002
		if (rect == null) {
1003
			latLonID = "EPSG:4326";
1004
			rect = explorer.getBoundingBox(layerNames, latLonID);
1005
			if (rect == null) {
1006
				rect = explorer.getBoundingBox(layerNames, "CRS:84");
1007
			}
1008

  
1009
			IProjection reqProj = CRSFactory.getCRS(getSRS());
1010
			IProjection latLonProj = CRSFactory.getCRS(latLonID);
1011
			if ((reqProj != null) && (latLonProj != null)) {
1012
				ICoordTrans ct = latLonProj.getCT(reqProj);
1013
				Rectangle2D reprojectedRect;
1014
				reprojectedRect = ct.convert(rect);
1015
				rect = reprojectedRect;
1016
			} else {
1017
//				throw new ProjectionLayerException(PluginServices.getText(this,
1018
//						"cannotReproject")
1019
//						+ " " + getSRS() + " -> " + latLonID);
1020
				throw new ProjectionLayerException(getName(),null);
1021
			}
1022
		}
1023

  
1024
		return rect;
995
		return explorer.getBoundingBox(layerNames, getSRS());
1025 996
	}
1026 997

  
1027 998
	public TreePath[] getSelectedLayers() {

Also available in: Unified diff