From 6c07bc7ff1fd65e4635bdd0516926e07c0a93a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 29 Jul 2008 18:13:08 +0000 Subject: [PATCH] new RegularPolygon features can be invisible, p=me, r=crschmidt (closes #1577) git-svn-id: http://svn.openlayers.org/trunk/openlayers@7588 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Handler/RegularPolygon.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Handler/RegularPolygon.js b/lib/OpenLayers/Handler/RegularPolygon.js index ffbe5aca7f..3c507975db 100644 --- a/lib/OpenLayers/Handler/RegularPolygon.js +++ b/lib/OpenLayers/Handler/RegularPolygon.js @@ -156,7 +156,14 @@ OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, { var activated = false; if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) { // create temporary vector layer for rendering geometry sketch - var options = {displayInLayerSwitcher: false}; + var options = { + displayInLayerSwitcher: false, + // indicate that the temp vector layer will never be out of range + // without this, resolution properties must be specified at the + // map-level for this temporary layer to init its resolutions + // correctly + calculateInRange: function() { return true; } + }; this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options); this.map.addLayer(this.layer); activated = true;