Files
openlayers/examples/wms-capabilities.js
Bart van den Eijnden 793a956211 Several fixes to the WMS Capabilities parser
Make sure the object structure returned is not mangled by Closure

Do not use closure XHR or JSON in the example

Use Jasmine's async support in the test cases

Get rid of some backwards compatibility now that we have a fresh start
2013-02-19 17:12:02 +01:00

20 lines
490 B
JavaScript

goog.require('ol.parser.ogc.WMSCapabilities');
var parser = new ol.parser.ogc.WMSCapabilities(), result;
var url = '../test/spec/ol/parser/ogc/xml/wmscapabilities_v1_3_0/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);
}
};
xhr.send();