From 742ada16bf12fda58df603eb8d067897ff6fb855 Mon Sep 17 00:00:00 2001 From: fredj Date: Wed, 1 Feb 2012 11:18:17 +0100 Subject: [PATCH] Allow testing of specific renderers via '?renderer=' --- examples/graphic-name.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/graphic-name.js b/examples/graphic-name.js index 9349ed28b6..654a4c997d 100644 --- a/examples/graphic-name.js +++ b/examples/graphic-name.js @@ -5,6 +5,10 @@ OpenLayers.Renderer.symbol.church = [4, 0, 6, 0, 6, 4, 10, 4, 10, 6, 6, 6, 6, 14 var map; 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', { controls: [] }); @@ -46,7 +50,8 @@ function init(){ // Create a vector layer and give it your style map. var layer = new OpenLayers.Layer.Vector("Graphics", { styleMap: styles, - isBaseLayer: true + isBaseLayer: true, + renderers: renderer }); layer.addFeatures(features); map.addLayer(layer);