[Commits] r2096 - core/trunk/geoext/examples

commits at geoext.org commits at geoext.org
Mon Apr 19 20:50:41 CEST 2010


Author: ahocevar
Date: 2010-04-19 20:50:41 +0200 (Mon, 19 Apr 2010)
New Revision: 2096

Modified:
   core/trunk/geoext/examples/legendpanel.js
Log:
added a vector feature to show a VectorLegend

Modified: core/trunk/geoext/examples/legendpanel.js
===================================================================
--- core/trunk/geoext/examples/legendpanel.js	2010-04-19 15:08:08 UTC (rev 2095)
+++ core/trunk/geoext/examples/legendpanel.js	2010-04-19 18:50:41 UTC (rev 2096)
@@ -36,6 +36,10 @@
                     strokeWidth: 2
                 }) }) })
     ]);
+    map.layers[2].addFeatures([
+        new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT(
+            "POLYGON(146.1 -41, 146.2 -41, 146.2 -41.1, 146.1 -41.1)"))
+    ]);
     map.addControl(new OpenLayers.Control.LayerSwitcher());
 
     var addRemoveLayer = function() {
@@ -97,7 +101,7 @@
     legendPanel = new GeoExt.LegendPanel({
         defaults: {
             labelCls: 'mylabel',
-            style: 'padding:5px'            
+            style: 'padding:5px'
         },
         bodyStyle: 'padding:5px',
         width: 350,



More information about the Commits mailing list