[OpenLayers-Commits] r3135 - sandbox/ominiverdi/openlayers/lib/OpenLayers/Control

commits at openlayers.org commits at openlayers.org
Fri May 4 12:54:55 EDT 2007


Author: ominiverdi
Date: 2007-05-04 12:54:54 -0400 (Fri, 04 May 2007)
New Revision: 3135

Modified:
   sandbox/ominiverdi/openlayers/lib/OpenLayers/Control/WMSManager.js
Log:
WMSManager (ticket #687): probably added basic TileCache support

Modified: sandbox/ominiverdi/openlayers/lib/OpenLayers/Control/WMSManager.js
===================================================================
--- sandbox/ominiverdi/openlayers/lib/OpenLayers/Control/WMSManager.js	2007-05-04 16:03:44 UTC (rev 3134)
+++ sandbox/ominiverdi/openlayers/lib/OpenLayers/Control/WMSManager.js	2007-05-04 16:54:54 UTC (rev 3135)
@@ -78,7 +78,7 @@
 	//WMS default params
 	/** @type string */
     exceptionsValue: 'application/vnd.ogc.se_inimage',//OL default value
-	//exceptionsValue: 'application/vnd.ogc.se_xml',
+	resolutionsValue: null,//OL default value
 	
  
     /**
@@ -585,6 +585,19 @@
 				//if default format is not supported use the first usable
 				if(!formatExists) this.WMSManager.exceptionsValue = oFormats[0];
 			}
+			
+			
+			//Check resolutionsValue for TileCache
+			var resolutions = xml.getElementsByTagName('Resolutions');
+			if(resolutions.length){
+				var resolutionsS = resolutions[0].textContent;
+				if(resolutionsS.length){
+					var aResolutions = resolutionsS.split(' ');
+					//this.WMSManager.resolutionsValue = resolutionsS.replace(" ",",");
+					this.WMSManager.resolutionsValue = aResolutions;
+				} 
+				
+			}
 		 
 			 //Print Layer List
 			 var aLayer = xml.getElementsByTagName('Layer');
@@ -760,6 +773,11 @@
 		if(this.WMSManager.exceptionsValue)
 			var exception = this.WMSManager.exceptionsValue;
 		 
+		 
+		 if(this.WMSManager.resolutionsValue){
+		 		var options = {resolutions: this.WMSManager.resolutionsValue};
+		 		this.WMSManager.map.setOptions(options) ;
+			}
 		
 		if(overlayButton.checked){
 			var layer = new OpenLayers.Layer.WMS( title, 



More information about the Commits mailing list