[Commits] r1671 - in sandbox/redlining/ux/RedLining: examples ux/widgets/form
commits at geoext.org
commits at geoext.org
Fri Jan 8 14:49:00 CET 2010
Author: adube
Date: 2010-01-08 14:49:00 +0100 (Fri, 08 Jan 2010)
New Revision: 1671
Modified:
sandbox/redlining/ux/RedLining/examples/RedLiningExample.js
sandbox/redlining/ux/RedLining/ux/widgets/form/ComplexRedLiningForm.js
Log:
now possible to define his own layer object
Modified: sandbox/redlining/ux/RedLining/examples/RedLiningExample.js
===================================================================
--- sandbox/redlining/ux/RedLining/examples/RedLiningExample.js 2010-01-08 13:38:35 UTC (rev 1670)
+++ sandbox/redlining/ux/RedLining/examples/RedLiningExample.js 2010-01-08 13:49:00 UTC (rev 1671)
@@ -1,8 +1,8 @@
-var redLiningTool;
+var redLiningTool, mapPanel;
Ext.onReady(function() {
- var mapPanel = new GeoExt.MapPanel({
+ mapPanel = new GeoExt.MapPanel({
region: "center",
layers: [new OpenLayers.Layer.WMS("Global Imagery",
"http://labs.metacarta.com/wms/vmap0",
Modified: sandbox/redlining/ux/RedLining/ux/widgets/form/ComplexRedLiningForm.js
===================================================================
--- sandbox/redlining/ux/RedLining/ux/widgets/form/ComplexRedLiningForm.js 2010-01-08 13:38:35 UTC (rev 1670)
+++ sandbox/redlining/ux/RedLining/ux/widgets/form/ComplexRedLiningForm.js 2010-01-08 13:49:00 UTC (rev 1671)
@@ -30,6 +30,8 @@
map: null,
main: null,
+
+ layer: null,
/** private: method[initComponent]
*/
@@ -67,9 +69,10 @@
/** private: method[initLayer]
*/
initLayer: function() {
- var layer = new OpenLayers.Layer.Vector("cosmetic");
+ var layer = this.layer || new OpenLayers.Layer.Vector("cosmetic");
this.main.addLayer(layer);
this.main.setActiveLayer(layer);
+ this.layer = layer;
},
/** private: method[initDrawControls]
More information about the Commits
mailing list