[OpenLayers-Commits] r11826 - in sandbox/cmoullet/openlayers: . examples

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Mar 31 04:28:29 EDT 2011


Author: cmoullet
Date: 2011-03-31 01:28:28 -0700 (Thu, 31 Mar 2011)
New Revision: 11826

Modified:
   sandbox/cmoullet/openlayers/
   sandbox/cmoullet/openlayers/examples/donut.js
   sandbox/cmoullet/openlayers/examples/mobile-drawing.js
Log:
Merge with trunk



Property changes on: sandbox/cmoullet/openlayers
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11775,11777-11820
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11775,11777-11825

Modified: sandbox/cmoullet/openlayers/examples/donut.js
===================================================================
--- sandbox/cmoullet/openlayers/examples/donut.js	2011-03-31 08:12:18 UTC (rev 11825)
+++ sandbox/cmoullet/openlayers/examples/donut.js	2011-03-31 08:28:28 UTC (rev 11826)
@@ -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;

Modified: sandbox/cmoullet/openlayers/examples/mobile-drawing.js
===================================================================
--- sandbox/cmoullet/openlayers/examples/mobile-drawing.js	2011-03-31 08:12:18 UTC (rev 11825)
+++ sandbox/cmoullet/openlayers/examples/mobile-drawing.js	2011-03-31 08:28:28 UTC (rev 11826)
@@ -1,7 +1,13 @@
 function init() {
 
     // create a vector layer for drawing
-    var vector = new OpenLayers.Layer.Vector();
+    var vector = new OpenLayers.Layer.Vector('Vector Layer', {
+        styleMap: new OpenLayers.StyleMap({
+            temporary: OpenLayers.Util.applyDefaults({
+                pointRadius: 16
+            }, OpenLayers.Feature.Vector.style.temporary)
+        })
+    });
 
     // OpenLayers' EditingToolbar internally creates a Navigation control, we
     // want a TouchNavigation control here so we create our own editing toolbar
@@ -52,4 +58,4 @@
     // activate the first control to render the "navigation icon"
     // as active
     toolbar.controls[0].activate();
-};
+}



More information about the Commits mailing list