3 <script src="../../../lib/OpenLayers.js"></script>
4 <script src="v1_1_1.js"></script>
5 <script type="text/javascript">
7 function test_read(t) {
11 var format = new OpenLayers.Format.WMSCapabilities();
12 var obj = format.read(doc);
14 var capability = obj.capability;
15 t.ok(capability, "object contains capability property");
17 var getmap = capability.request.getmap;
18 t.eq(getmap.formats.length, 28, "getmap formats parsed");
21 "http://publicus.opengeo.org:80/geoserver/wms?SERVICE=WMS&",
25 t.ok(capability.layers, "layers parsed");
26 t.eq(capability.layers.length, 22, "correct number of layers parsed");
28 var layer = capability.layers[2];
29 t.eq(layer.name, "tiger:tiger_roads", "[2] correct layer name");
30 t.eq(layer.title, "Manhattan (NY) roads", "[2] correct layer title");
33 "Highly simplified road layout of Manhattan in New York..",
34 "[2] correct layer abstract"
38 [-74.08769307536667, 40.660618924633326, -73.84653192463333, 40.90178007536667],
39 "[2] correct layer bbox"
41 t.eq(layer.styles.length, 1, "[2] correct styles length");
42 t.eq(layer.styles[0].name, "tiger_roads", "[2] correct style name");
44 layer.styles[0].legend.href,
45 "http://publicus.opengeo.org:80/geoserver/wms/GetLegendGraphic?VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER=tiger:tiger_roads",
46 "[2] correct legend url"
48 t.eq(layer.queryable, true, "[2] correct queryable attribute");