06 April 2016 2 9K Report

have some data stored in geoserver, i want to create a simple WMS browser, calling data from geoserver and show it in a grid. the web page becomes white i think i have problem with my code

` GeoExt WMS Browser

Ext.onReady(function() {

var grid = new Ext.grid.GridPanel({

title: "Available WMS Layers",

region: "north",

height: 150,

viewConfig: {forceFit: true},

store: new GeoExt.data.WMSCapabilitiesStore({

url: "http://localhost:8080/geoserver/Rabat/wms?service=WMS&version=1.1.0&request=GetCapabilities",

autoLoad: true

}),

columns: [

{header: "nom", dataIndex: "nom", sortable: true},

{header: "commune", dataIndex: "commune", sortable: true},

{header: "type", dataIndex: "type"}

]

});

var map = new OpenLayers.Map({allOverlays: true});

var mapPanel = new GeoExt.MapPanel({

title: "Map",

region: "center",

map: map

});

new Ext.Panel({

renderTo: document.body,

width: 800,

height: 450,

layout: "border",

items: [grid, mapPanel]

});

More Rida Azmi's questions See All
Similar questions and discussions