[OpenLayers-Commits] r11822 - trunk/openlayers/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Mar 31 03:01:36 EDT 2011
Author: fredj
Date: 2011-03-31 00:01:35 -0700 (Thu, 31 Mar 2011)
New Revision: 11822
Modified:
trunk/openlayers/examples/donut.js
Log:
add 'renderer' url param.
Modified: trunk/openlayers/examples/donut.js
===================================================================
--- trunk/openlayers/examples/donut.js 2011-03-31 06:55:06 UTC (rev 11821)
+++ trunk/openlayers/examples/donut.js 2011-03-31 07:01:35 UTC (rev 11822)
@@ -1,3 +1,7 @@
+// 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;
+
var map = new OpenLayers.Map({
div: "map",
layers: [
@@ -2,3 +6,5 @@
new OpenLayers.Layer.OSM(),
- new OpenLayers.Layer.Vector()
+ new OpenLayers.Layer.Vector("Vector Layer", {
+ renderers: renderer
+ })
],
@@ -35,4 +41,4 @@
draw.deactivate();
}
}
-document.getElementById("noneToggle").checked = true;
\ No newline at end of file
+document.getElementById("noneToggle").checked = true;
More information about the Commits
mailing list