Revision 4307
Added by ben leinfelder over 15 years ago
EditContext.js | ||
---|---|---|
2 | 2 |
Author: Mike Adair mike.adairATccrs.nrcan.gc.ca |
3 | 3 |
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html |
4 | 4 |
|
5 |
$Id$ |
|
5 |
$Id: EditContext.js 3881 2008-02-27 15:41:07Z gjvoosten $
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
// Ensure this object's dependancies are loaded. |
... | ... | |
23 | 23 |
|
24 | 24 |
// Set stylesheet parameters for all the child nodes from the config file |
25 | 25 |
for (var j=0;j<toolNode.childNodes.length;j++) { |
26 |
if (toolNode.childNodes[j].firstChild && toolNode.childNodes[j].firstChild.nodeValue) {
|
|
27 |
this.stylesheet.setParameter(toolNode.childNodes[j].nodeName,toolNode.childNodes[j].firstChild.nodeValue);
|
|
26 |
if (getNodeValue(toolNode.childNodes[j])) {
|
|
27 |
this.stylesheet.setParameter(toolNode.childNodes[j].nodeName,getNodeValue(toolNode.childNodes[j]));
|
|
28 | 28 |
} |
29 | 29 |
} |
30 | 30 |
|
... | ... | |
41 | 41 |
this.stylesheet.setParameter("format", this.model.getImageFormat() ); |
42 | 42 |
var newNode = this.stylesheet.transformNodeToObject(feature); |
43 | 43 |
Sarissa.setXpathNamespaces(newNode, this.targetModel.namespace); |
44 |
if (this.debug) alert(newNode.xml);
|
|
44 |
mbDebugMessage(this, newNode.xml);
|
|
45 | 45 |
this.targetModel.setParam('addLayer',newNode.documentElement); |
46 | 46 |
} |
47 | 47 |
|
... | ... | |
53 | 53 |
var feature = this.model.getFeatureNode(featureName); |
54 | 54 |
var newNode = this.stylesheet.transformNodeToObject(feature); |
55 | 55 |
Sarissa.setXpathNamespaces(newNode, this.targetModel.namespace); |
56 |
if (this.debug) alert(newNode.xml);
|
|
56 |
mbDebugMessage(this, newNode.xml);
|
|
57 | 57 |
this.targetModel.setParam('addLayer',newNode.documentElement); |
58 | 58 |
} |
59 | 59 |
|
Also available in: Unified diff
upgrade to MapBuilder 1.5rc2 - includes support for Firefox 3 compatibility (yes, it is also EOLed)