From 80f3c81f11204681c1127f75c20d21fc7db4a052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Junod?= Date: Wed, 7 Sep 2011 16:00:09 +0000 Subject: [PATCH] measure example: add renderer url param. non-functional change git-svn-id: http://svn.openlayers.org/trunk/openlayers@12336 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/measure.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/examples/measure.html b/examples/measure.html index ed3ea9747f..1cf61ad473 100644 --- a/examples/measure.html +++ b/examples/measure.html @@ -70,12 +70,19 @@ ]); var styleMap = new OpenLayers.StyleMap({"default": style}); + // 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; + measureControls = { line: new OpenLayers.Control.Measure( OpenLayers.Handler.Path, { persist: true, handlerOptions: { - layerOptions: {styleMap: styleMap} + layerOptions: { + renderers: renderer, + styleMap: styleMap + } } } ), @@ -83,7 +90,10 @@ OpenLayers.Handler.Polygon, { persist: true, handlerOptions: { - layerOptions: {styleMap: styleMap} + layerOptions: { + renderers: renderer, + styleMap: styleMap + } } } )