[fusion-commits] r2722 - trunk/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed May 29 00:15:08 PDT 2013
Author: jng
Date: 2013-05-29 00:15:07 -0700 (Wed, 29 May 2013)
New Revision: 2722
Modified:
trunk/lib/Map.js
Log:
#570: Code cleanup
Modified: trunk/lib/Map.js
===================================================================
--- trunk/lib/Map.js 2013-05-29 06:54:18 UTC (rev 2721)
+++ trunk/lib/Map.js 2013-05-29 07:15:07 UTC (rev 2722)
@@ -1705,6 +1705,7 @@
var layer = this.oMapOL.getLayer(this.ID_DIGITIZING_LAYER);
if (layer == null) {
layer = new OpenLayers.Layer.Vector("Digitizing Layer", { styleMap: this.digitizingStyleMap });
+ layer.id = this.ID_DIGITIZING_LAYER;
this.oMapOL.addLayers([layer]);
}
return layer;
@@ -1751,11 +1752,11 @@
if (ctrl.events) {
var oneShotHandler = OpenLayers.Function.bind(function(cid, evt) {
ctrl.events.unregister("featureadded", null, oneShotHandler);
- console.log("De-registered one-shot callback for: " + cid)
+ //console.log("De-registered one-shot callback for: " + cid)
this._onGeometryDigitized(evt, cid, origCallback);
}, this, controlId);
ctrl.events.register("featureadded", null, oneShotHandler);
- console.log("Register one-shot callback for: " + controlId);
+ //console.log("Register one-shot callback for: " + controlId);
}
ctrl.activate();
this._triggerDigitizerActivated();
@@ -1763,7 +1764,7 @@
_triggerDigitizerActivated: function() {
this.isDigitizing = true;
this.triggerEvent(Fusion.Event.MAP_DIGITIZER_ACTIVATED);
- console.log("digitizer activated")
+ //console.log("digitizer activated")
},
_triggerDigitizerDeactivated: function() {
this.isDigitizing = false;
@@ -1771,7 +1772,7 @@
this.message.clear();
} catch (e) {}
this.triggerEvent(Fusion.Event.MAP_DIGITIZER_DEACTIVATED);
- console.log("digitizer de-activated")
+ //console.log("digitizer de-activated")
},
onKeyPress: function(e) {
if (this.isDigitizing) {
@@ -1808,7 +1809,7 @@
});
this.oMapOL.addControl(ctrl);
}
- if (options.prompt) {
+ if (options && options.prompt) {
this._setDigitizationPrompt(options.prompt);
}
this._activateDigitizer(ctrl, this.DRAW_CONTROL_POINT, callback);
@@ -1846,7 +1847,7 @@
});
this.oMapOL.addControl(ctrl);
}
- if (options.prompt) {
+ if (options && options.prompt) {
this._setDigitizationPrompt(options.prompt);
}
this._activateDigitizer(ctrl, this.DRAW_CONTROL_LINE, callback);
@@ -1882,7 +1883,7 @@
});
this.oMapOL.addControl(ctrl);
}
- if (options.prompt) {
+ if (options && options.prompt) {
this._setDigitizationPrompt(options.prompt);
}
this._activateDigitizer(ctrl, this.DRAW_CONTROL_LINESTR, callback);
@@ -1919,7 +1920,7 @@
});
this.oMapOL.addControl(ctrl);
}
- if (options.prompt) {
+ if (options && options.prompt) {
this._setDigitizationPrompt(options.prompt);
}
this._activateDigitizer(ctrl, this.DRAW_CONTROL_RECT, callback);
@@ -1955,7 +1956,7 @@
});
this.oMapOL.addControl(ctrl);
}
- if (options.prompt) {
+ if (options && options.prompt) {
this._setDigitizationPrompt(options.prompt);
}
this._activateDigitizer(ctrl, this.DRAW_CONTROL_POLY, callback);
More information about the fusion-commits
mailing list