measure example: add renderer url param. non-functional change

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12336 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2011-09-07 16:00:09 +00:00
parent 6006a12720
commit 80f3c81f11
+12 -2
View File
@@ -70,12 +70,19 @@
]); ]);
var styleMap = new OpenLayers.StyleMap({"default": style}); 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 = { measureControls = {
line: new OpenLayers.Control.Measure( line: new OpenLayers.Control.Measure(
OpenLayers.Handler.Path, { OpenLayers.Handler.Path, {
persist: true, persist: true,
handlerOptions: { handlerOptions: {
layerOptions: {styleMap: styleMap} layerOptions: {
renderers: renderer,
styleMap: styleMap
}
} }
} }
), ),
@@ -83,7 +90,10 @@
OpenLayers.Handler.Polygon, { OpenLayers.Handler.Polygon, {
persist: true, persist: true,
handlerOptions: { handlerOptions: {
layerOptions: {styleMap: styleMap} layerOptions: {
renderers: renderer,
styleMap: styleMap
}
} }
} }
) )