[OpenLayers-Commits] r11726 - trunk/openlayers/tests/manual

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Mar 23 12:37:25 EDT 2011


Author: fredj
Date: 2011-03-23 09:37:23 -0700 (Wed, 23 Mar 2011)
New Revision: 11726

Modified:
   trunk/openlayers/tests/manual/vector-features-performance.html
Log:
add renderer url param. r=ahocevar (closes #3186)

Modified: trunk/openlayers/tests/manual/vector-features-performance.html
===================================================================
--- trunk/openlayers/tests/manual/vector-features-performance.html	2011-03-22 19:54:31 UTC (rev 11725)
+++ trunk/openlayers/tests/manual/vector-features-performance.html	2011-03-23 16:37:23 UTC (rev 11726)
@@ -81,9 +81,16 @@
         }
 
         function init(){
+            // allow testing of specific renderers via "?renderer=Canvas", etc
+            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
             map = new OpenLayers.Map('map');
             
-            vectorLayer = new OpenLayers.Layer.Vector("Vector Layer", {isBaseLayer: true});
+            vectorLayer = new OpenLayers.Layer.Vector("Vector Layer", {
+                isBaseLayer: true,
+                renderers: renderer
+            });
 
             map.addLayers([vectorLayer]);
             map.addControl(new OpenLayers.Control.MousePosition());



More information about the Commits mailing list