[OpenLayers-Commits] r3551 - sandbox/camptocamp/vectorSymbols/lib/OpenLayers/Renderer

commits at openlayers.org commits at openlayers.org
Mon Jul 2 08:55:11 EDT 2007


Author: pgiraud
Date: 2007-07-02 08:55:09 -0400 (Mon, 02 Jul 2007)
New Revision: 3551

Modified:
   sandbox/camptocamp/vectorSymbols/lib/OpenLayers/Renderer/SVG.js
Log:
added parking symbol

Modified: sandbox/camptocamp/vectorSymbols/lib/OpenLayers/Renderer/SVG.js
===================================================================
--- sandbox/camptocamp/vectorSymbols/lib/OpenLayers/Renderer/SVG.js	2007-07-02 12:54:02 UTC (rev 3550)
+++ sandbox/camptocamp/vectorSymbols/lib/OpenLayers/Renderer/SVG.js	2007-07-02 12:55:09 UTC (rev 3551)
@@ -538,7 +538,6 @@
     },
     
     /**
-     * @param {String} id
      * @public
      */
     addSymbolReference: function() {
@@ -554,6 +553,25 @@
         
         this.defs.appendChild(symbol);
 
+        var symbol = this.nodeFactory('parking', "symbol");
+        var rect = this.nodeFactory(null, "rect");
+        rect.setAttributeNS(null, "fill", "#0087ff");
+        rect.setAttributeNS(null, "width", 20);
+        rect.setAttributeNS(null, "height", 20);
+        rect.setAttributeNS(null, "x", 0);
+        rect.setAttributeNS(null, "y", -10);
+        rect.setAttributeNS(null, "rx", 4);
+        rect.setAttributeNS(null, "ry", 4);
+        symbol.appendChild(rect);
+        var path = this.nodeFactory(null, "path");
+        path.setAttributeNS(null, "d", "M 5,8 L 5,-7 L 12,-7 C 14,-7 15.5,-5.3 16,-4 C 16.5,-2.77 16.5,-1.23 16,0 C 15.41,1.42 14,3 12,3 L 8,3 L 8,8 L 5,8 z M 8,-4 L 8,0 C 9.3,0 11,0 12.32,-0.31 C 13.6,-0.76 13.5,-2.8 12.5,-3.48 C 11.5,-4.1 8.6,-4 8,-4 z ");
+        path.setAttributeNS(null, "fill", "white");
+        path.setAttributeNS(null, "fill-rule", "evenodd");
+        symbol.setAttributeNS(null, "viewBox", "0 -10 20 20");
+        symbol.appendChild(path);
+        
+        this.defs.appendChild(symbol);
+        
         var symbol = this.nodeFactory('airport', "symbol");
         var shape = this.nodeFactory(null, "path");
         shape.setAttributeNS(null, "d", "M 9.2,5 C 9.2,4.5 9.8,3.2 10,3 L 9,3 L 8,4 L 5.5,4 L 8,0 L 6,0 L 3,4 C 2,4 1,4.2 0.5,4.5 C 0,5 0,5 0.5,5.5 C 1,5.8 2,6 3,6 L 6,10 L 8,10 L 5.5,6 L 7.8,6 L 9,7 L 10,7 C 9.8,6.8 9.2,5.5 9.2,5 z");
@@ -581,6 +599,11 @@
 
         /*
         
+        <symbol id="symbol-parking" viewBox="10 0 20 20">
+            <rect stroke="none" fill="#0087ff" width="20" height="20" x="0" y="-10" rx="4" ry="4"/>
+            <path stroke="none" fill="white" fill-rule="nonzero" d="M 5,8 L 5,-7 L 12,-7 C 14,-7 15.5,-5.3 16,-4 C 16.5,-2.77 16.5,-1.23 16,0 C 15.41,1.42 14,3 12,3 L 8,3 L 8,8 L 5,8 z M 8,-4 L 8,0 C 9.3,0 11,0 12.32,-0.31 C 13.6,-0.76 13.5,-2.8 12.5,-3.48 C 11.5,-4.1 8.6,-4 8,-4 z "/>
+        </symbol>
+        
         <symbol
        id="symbol-airport"
        viewBox="0 0 10 10"



More information about the Commits mailing list