|
Revision 1941, 1.4 kB
(checked in by fvanderbiest, 6 months ago)
|
fvanderbiest sandbox: export openlayers trunk @r10096
|
| Line | |
|---|
| 1 |
<html xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 2 |
<head> |
|---|
| 3 |
<title>OpenLayers WMSDescribeLayer Parser Example</title> |
|---|
| 4 |
<link rel="stylesheet" href="style.css" type="text/css" /> |
|---|
| 5 |
<script src="../lib/OpenLayers.js"></script> |
|---|
| 6 |
<script type="text/javascript"> |
|---|
| 7 |
function parseData(req) { |
|---|
| 8 |
format = new OpenLayers.Format.WMSDescribeLayer(); |
|---|
| 9 |
html = "<br />" |
|---|
| 10 |
resp = format.read(req.responseText); |
|---|
| 11 |
for(var i = 0; i < resp.length; i++) { |
|---|
| 12 |
html += "Layer: typeName: "+ resp[i].typeName+","; |
|---|
| 13 |
html += "<ul>"; |
|---|
| 14 |
html += "<li>owsURL: "+resp[i].owsURL+"</li>"; |
|---|
| 15 |
html += "<li>owsType: "+resp[i].owsType+"</li>"; |
|---|
| 16 |
html += "</ul>" |
|---|
| 17 |
} |
|---|
| 18 |
document.getElementById('output').innerHTML = html; |
|---|
| 19 |
} |
|---|
| 20 |
function load() { |
|---|
| 21 |
OpenLayers.loadURL("xml/wmsdescribelayer.xml", "", null, parseData); |
|---|
| 22 |
} |
|---|
| 23 |
</script> |
|---|
| 24 |
</head> |
|---|
| 25 |
<body onload="load()"> |
|---|
| 26 |
<h1 id="title">WMSDescribeLayer Parser Example</h1> |
|---|
| 27 |
|
|---|
| 28 |
<div id="tags"></div> |
|---|
| 29 |
|
|---|
| 30 |
<p id="shortdesc"> |
|---|
| 31 |
Demonstrate the operation of the WMSDescribeLayer parser. |
|---|
| 32 |
</p> |
|---|
| 33 |
|
|---|
| 34 |
<div id="output"></div> |
|---|
| 35 |
|
|---|
| 36 |
<div id="docs"> |
|---|
| 37 |
This script reads data from a file and parses out the coordinates, appending them to a HTML string with markup tags. |
|---|
| 38 |
This markup is dumped to an element in the page. |
|---|
| 39 |
</div> |
|---|
| 40 |
</body> |
|---|
| 41 |
</html> |
|---|