Merge pull request #814 from eykamp/wcsdev
Add WCS GetCapabilities parsing for WCS 1.0.0 and 1.1.0 (r=@bartvde)
This commit is contained in:
43
tests/Format/WCSCapabilities.html
Normal file
43
tests/Format/WCSCapabilities.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="../OLLoader.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function test_read(t) {
|
||||
t.plan(4);
|
||||
|
||||
var _v1_0_0 = OpenLayers.Format.WCSCapabilities.v1_0_0.prototype.read;
|
||||
var _v1_1_0 = OpenLayers.Format.WCSCapabilities.v1_1_0.prototype.read;
|
||||
|
||||
var parser = new OpenLayers.Format.WCSCapabilities();
|
||||
|
||||
// version 1.0.0
|
||||
var text =
|
||||
'<?xml version="1.0" encoding="UTF-8"?>' +
|
||||
'<wcs:WCS_Capabilities version="1.0.0" xmlns:wcs="http://www.opengis.net/wcs"></wcs:WCS_Capabilities>';
|
||||
OpenLayers.Format.WCSCapabilities.v1_0_0.prototype.read = function() {
|
||||
t.ok(true, "Version 1.0.0 detected");
|
||||
return {};
|
||||
}
|
||||
var res = parser.read(text);
|
||||
t.eq(res.version, "1.0.0", "version 1.0.0 written to result object");
|
||||
OpenLayers.Format.WCSCapabilities.v1_1_0.prototype.read = _v1_1_0;
|
||||
|
||||
// version 1.1.0
|
||||
var text =
|
||||
'<?xml version="1.0" encoding="UTF-8"?>' +
|
||||
'<wcs:WCS_Capabilities version="1.1.0" xmlns:wcs="http://www.opengis.net/wcs/1.1"></wcs:WCS_Capabilities>';
|
||||
OpenLayers.Format.WCSCapabilities.v1_1_0.prototype.read = function() {
|
||||
t.ok(true, "Version 1.1.0 detected");
|
||||
return {};
|
||||
}
|
||||
var res = parser.read(text);
|
||||
t.eq(res.version, "1.1.0", "version 1.1.0 written to result object");
|
||||
OpenLayers.Format.WCSCapabilities.v1_1_0.prototype.read = _v1_1_0;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
87
tests/Format/WCSCapabilities/v1.html
Normal file
87
tests/Format/WCSCapabilities/v1.html
Normal file
File diff suppressed because one or more lines are too long
@@ -40,4 +40,4 @@
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -85,6 +85,8 @@
|
||||
<li>Format/Filter/v1_0_0.html</li>
|
||||
<li>Format/Filter/v1_1_0.html</li>
|
||||
<li>Format/QueryStringFilter.html</li>
|
||||
<li>Format/WCSCapabilities.html</li>
|
||||
<li>Format/WCSCapabilities/v1.html</li>
|
||||
<li>Format/WFS.html</li>
|
||||
<li>Format/WFSCapabilities.html</li>
|
||||
<li>Format/WFSCapabilities/v1.html</li>
|
||||
|
||||
Reference in New Issue
Block a user