Mercurial > dive4elements > gnv-client
diff gnv/src/main/webapp/scripts/viewport.jsp @ 975:5779220ebb80
Added functionality to read WMS-Capabilities-Documents
gnv/trunk@1145 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 01 Jun 2010 17:40:54 +0000 |
parents | 1bb54da8c8ed |
children | 80a5cde45d12 |
line wrap: on
line diff
--- a/gnv/src/main/webapp/scripts/viewport.jsp Tue Jun 01 16:11:06 2010 +0000 +++ b/gnv/src/main/webapp/scripts/viewport.jsp Tue Jun 01 17:40:54 2010 +0000 @@ -99,7 +99,67 @@ }); - // map.setCenter(INITIAL_CENTER); + map.setCenter(INITIAL_CENTER); + + store = new GeoExt.data.WMSCapabilitiesStore({ + }); + store.load(); + + grid = new Ext.grid.GridPanel({ + id: 'wmsgrid', + collapsible: false, + split: false, + border: true, + //height: 400, + autoHeight: true, + store: store, + cm: new Ext.grid.ColumnModel([ + { + header: 'Name', + dataIndex: 'name', + sortable: true + }, + { + id: 'title', + header: 'Title', + dataIndex: 'title', + sortable: true + }]), + renderTo: 'capgrid', + bbar: [{ + text: 'Add Layer', + handler: addLayer + }] + }); + var cap = new Ext.Panel({ + id: 'wmspanel', + border: true, + region: 'east', + title: 'WMS Capabilities', + collapsible: false, + split: false, + contentEl: 'cap', + height: 400 + }); + + var capfield = new Ext.form.TextField({ + id: 'capfield', + region: 'east', + width: '100%', + renderTo: 'urlinput' + }); + + var capbutton = new Ext.Button({ + id: 'capbutton', + region: 'west', + handler: updateCapabilities, + text: 'Lade', + tooltip: 'Lade GetCapabilities Dokument', + renderTo: 'urlbutton' + }); + + + /* --------------------------- Layer Tree ----------------------------------- */ @@ -182,6 +242,7 @@ }, items: [ tree, + cap, legendPanel ] }