Revision 4307
Added by ben leinfelder over 15 years ago
WmsCapabilities.js | ||
---|---|---|
1 | 1 |
/* |
2 | 2 |
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html |
3 |
$Id$ |
|
3 |
$Id: WmsCapabilities.js 3887 2008-02-27 18:18:53Z ahocevar $
|
|
4 | 4 |
*/ |
5 | 5 |
|
6 |
// Ensure this object's dependancies are loaded. |
|
7 |
mapbuilder.loadScript(baseDir+"/model/ModelBase.js"); |
|
8 |
|
|
6 | 9 |
/** |
7 | 10 |
* Stores a Web Map Server (WMS) Capabilities document as defined by the |
8 |
* Open Geospatial Consortium (http://opengis.org and extensions the the WMC.
|
|
11 |
* Open Geospatial Consortium (http://www.opengeospatial.org/) and extensions the the WMC.
|
|
9 | 12 |
* |
10 | 13 |
* @constructor |
14 |
* @base ModelBase |
|
11 | 15 |
* @author Mike Adair |
12 | 16 |
* @param modelNode The model's XML object node from the configuration document. |
13 | 17 |
* @param parent The model object that this widget belongs to. |
... | ... | |
62 | 66 |
*/ |
63 | 67 |
this.getServerTitle = function() { |
64 | 68 |
var xpath = "/WMT_MS_Capabilities/Service/Title"; |
65 |
var node = this.doc.selectSingleNode(xpath); |
|
66 |
return node.firstChild.nodeValue; |
|
69 |
return Mapbuilder.getProperty(this.doc, xpath, "no title"); |
|
67 | 70 |
} |
68 | 71 |
|
69 | 72 |
/** |
... | ... | |
82 | 85 |
} |
83 | 86 |
} else { |
84 | 87 |
var xpath = "/WMT_MS_Capabilities/Capability/Request/GetMap/Format"; |
85 |
var node = this.doc.selectSingleNode(xpath); |
|
86 |
return node.firstChild.nodeValue; |
|
88 |
return Mapbuilder.getProperty(this.doc, xpath); |
|
87 | 89 |
} |
88 | 90 |
} |
89 | 91 |
|
... | ... | |
92 | 94 |
*/ |
93 | 95 |
this.getServiceName = function() { |
94 | 96 |
var xpath = "/WMT_MS_Capabilities/Service/Name"; |
95 |
var node = this.doc.selectSingleNode(xpath); |
|
96 |
return node.firstChild.nodeValue; |
|
97 |
return Mapbuilder.getProperty(this.doc, xpath); |
|
97 | 98 |
} |
98 | 99 |
|
99 | 100 |
/** |
Also available in: Unified diff
upgrade to MapBuilder 1.5rc2 - includes support for Firefox 3 compatibility (yes, it is also EOLed)