Add WMS GetCapabilties parser

This commit is contained in:
oterral
2013-12-04 17:52:47 +01:00
committed by Tom Payne
parent 1dd5f7f7c8
commit bd560bfb0f
30 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
goog.require('ol.parser.ogc.WMSCapabilities');
var parser = new ol.parser.ogc.WMSCapabilities(), result;
var url = 'data/ogcsample.xml';
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
/**
* onload handler for the XHR request.
*/
xhr.onload = function() {
if (xhr.status == 200) {
result = parser.read(xhr.responseXML);
document.getElementById('log').innerHTML =
window.JSON.stringify(result, undefined, 2);
}
};
xhr.send();