[OpenLayers-Commits] r11780 - trunk/openlayers/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Mar 30 08:51:02 EDT 2011
Author: fredj
Date: 2011-03-30 05:51:01 -0700 (Wed, 30 Mar 2011)
New Revision: 11780
Modified:
trunk/openlayers/examples/drag-feature.html
trunk/openlayers/examples/modify-feature.html
trunk/openlayers/examples/select-feature.html
Log:
add 'renderer' url param.
Modified: trunk/openlayers/examples/drag-feature.html
===================================================================
--- trunk/openlayers/examples/drag-feature.html 2011-03-30 12:47:42 UTC (rev 11779)
+++ trunk/openlayers/examples/drag-feature.html 2011-03-30 12:51:01 UTC (rev 11780)
@@ -25,8 +25,14 @@
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
- vectors = new OpenLayers.Layer.Vector("Vector Layer");
+ // 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;
+ vectors = new OpenLayers.Layer.Vector("Vector Layer", {
+ renderers: renderer
+ });
+
map.addLayers([wms, vectors]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition());
Modified: trunk/openlayers/examples/modify-feature.html
===================================================================
--- trunk/openlayers/examples/modify-feature.html 2011-03-30 12:47:42 UTC (rev 11779)
+++ trunk/openlayers/examples/modify-feature.html 2011-03-30 12:51:01 UTC (rev 11780)
@@ -25,8 +25,15 @@
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '2';
- vectors = new OpenLayers.Layer.Vector("Vector Layer");
+ // 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;
+
+ vectors = new OpenLayers.Layer.Vector("Vector Layer", {
+ renderers: renderer
+ });
+
map.addLayers([wms, vectors]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition());
Modified: trunk/openlayers/examples/select-feature.html
===================================================================
--- trunk/openlayers/examples/select-feature.html 2011-03-30 12:47:42 UTC (rev 11779)
+++ trunk/openlayers/examples/select-feature.html 2011-03-30 12:51:01 UTC (rev 11780)
@@ -22,7 +22,13 @@
{layers: 'basic'}
);
- var vectors = new OpenLayers.Layer.Vector("Vector Layer");
+ // 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 vectors = new OpenLayers.Layer.Vector("Vector Layer", {
+ renderers: renderer
+ });
vectors.events.on({
'featureselected': function(feature) {
$('counter').innerHTML = this.selectedFeatures.length;
More information about the Commits
mailing list