[OpenLayers-Commits] r12364 - trunk/openlayers/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Sep 14 14:17:49 EDT 2011
Author: ahocevar
Date: 2011-09-14 11:17:49 -0700 (Wed, 14 Sep 2011)
New Revision: 12364
Modified:
trunk/openlayers/examples/select-feature-multilayer.html
Log:
allow renderer switching
Modified: trunk/openlayers/examples/select-feature-multilayer.html
===================================================================
--- trunk/openlayers/examples/select-feature-multilayer.html 2011-09-14 14:01:32 UTC (rev 12363)
+++ trunk/openlayers/examples/select-feature-multilayer.html 2011-09-14 18:17:49 UTC (rev 12364)
@@ -24,7 +24,12 @@
{layers: 'basic'}
);
+ // 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 vectors1 = new OpenLayers.Layer.Vector("Vector Layer 1", {
+ renderers: renderer,
styleMap: new OpenLayers.StyleMap({
"default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
externalGraphic: "../img/marker-green.png",
@@ -38,6 +43,7 @@
})
});
var vectors2 = new OpenLayers.Layer.Vector("Vector Layer 2", {
+ renderers: renderer,
styleMap: new OpenLayers.StyleMap({
"default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
fillColor: "red",
More information about the Commits
mailing list