[OpenLayers-Commits] r12442 - sandbox/august/trunk/lib/OpenLayers/Format

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sun Dec 4 16:23:59 EST 2011


Author: augusttown
Date: 2011-12-04 13:23:58 -0800 (Sun, 04 Dec 2011)
New Revision: 12442

Modified:
   sandbox/august/trunk/lib/OpenLayers/Format/AgsJsAdapter.js
Log:
1. when encoding externalGraphic in SLD, pointRadius*2 is used for <sld:Size>, so set pointRadius to agsPictureMarkerSymbol.size/2;
2. no 'opacity' attribute in agsPictureMarkerSymbol, always set to 100% opacity

Modified: sandbox/august/trunk/lib/OpenLayers/Format/AgsJsAdapter.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/AgsJsAdapter.js	2011-12-04 21:20:04 UTC (rev 12441)
+++ sandbox/august/trunk/lib/OpenLayers/Format/AgsJsAdapter.js	2011-12-04 21:23:58 UTC (rev 12442)
@@ -749,14 +749,17 @@
 	    			//pointSymbolizer.strokeLinecap = pointSymbolizer.strokeLinecap;	// 'strokeLinecap' not supported in AGS JS API    			
 	    			//pointSymbolizer.fillColor = agsPictureMarkerSymbol.color.toHex() || pointSymbolizer.fillColor;	// not applicable to agsPictureMarkerSymbol
 	    			//pointSymbolizer.fillOpacity = agsPictureMarkerSymbol.color.toRgba()[3] || pointSymbolizer.fillOpacity;	// not applicable to agsPictureMarkerSymbol	    			
-	    			pointSymbolizer.pointRadius = agsPictureMarkerSymbol.size || pointSymbolizer.pointRadius;
+	    			// when encoding externalGraphic in SLD, pointRadius*2 is used for <sld:Size>, so set pointRadius to agsPictureMarkerSymbol.size/2
+	    			pointSymbolizer.pointRadius = agsPictureMarkerSymbol.size/2 || pointSymbolizer.pointRadius;
 	    			pointSymbolizer.externalGraphic = agsPictureMarkerSymbol.url || pointSymbolizer.externalGraphic;	
 	    			pointSymbolizer.graphicWidth = Math.floor(agsPictureMarkerSymbol.width) || pointSymbolizer.graphicWidth;	
 	    			pointSymbolizer.graphicHeight = Math.floor(agsPictureMarkerSymbol.height) || pointSymbolizer.graphicHeight;
 	    			pointSymbolizer.graphicXOffset = agsPictureMarkerSymbol.xoffset || pointSymbolizer.graphicXOffset;	
 	    			pointSymbolizer.graphicYOffset = agsPictureMarkerSymbol.yoffset || pointSymbolizer.graphicYOffset;
+	    			// no 'opacity' attribute in agsPictureMarkerSymbol, always set to 100% opacity
+	    			pointSymbolizer.graphicOpacity = 1;	
 	    			// 'angle' is 'location'
-	    			pointSymbolizer.rotation = agsPictureMarkerSymbol.angle || pointSymbolizer.rotation;	  			
+	    			pointSymbolizer.rotation = agsPictureMarkerSymbol.angle;	  			
 	    			//pointSymbolizer.graphicName = pointSymbolizer.graphicName;	// not applicable to agsPictureMarkerSymbol    			
 		    		return pointSymbolizer;
 	    		} else {



More information about the Commits mailing list