[Users] Problem to list layers in my GridPanel

Riccardo GAETA ar_gaeta at yahoo.it
Fri Jun 17 12:04:18 CEST 2011


Hi all, it's my first time writing a post in this list.

I'm following the tutorial for GeoExt and I have some problem with the second lesson, "MapPanel Tutorial": I'm not able to show the layer list in the grid.

I attach here my html and js code.
If someone could help me to find an error I'll be very glad.

Thanks in advance,
Riccardo

HTML:
<html>
<head>
<title> A Basic GeoExt Page </title>
<script src="ext-3.4.0/adapter/ext/ext-base.js" type="text/javascript"></script>
<script src="ext-3.4.0/ext-all.js"  type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="ext-3.4.0/resources/css/ext-all.css"></link>
<script src="http://www.openlayers.org/api/2.10/OpenLayers.js"></script>
<script src="GeoExt/lib/GeoExt.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="GeoExt/resources/css/geoext-all-debug.css"></link>

<script type="text/javascript" src="geoext_test01.js"></script>
    
</head>
<body>
<table>
<td>
<div id="gxmap"></div>
</td>
<td>
<div id='layerGrid'></div>
</td>
</table>

</body>
</html>

And the JS file "geoext_test01.js":
Ext.onReady(function() {		layer_reg = new OpenLayers.Layer.WMS("Regioni", "/cgi-bin/mapserv.exe?",					{map: "C:/Program Files/OSGeo/MapGuide/Web/www/ric_MS/test_wfs.map", layers:'reg2010_s', isBaseLayer:false, sphericalMercator:true, transparent: true, singleTile: false, transitionEffect: 'resize', visibility: true});	        mapPanel = new GeoExt.MapPanel({			border: true,            renderTo: 'gxmap',			map: new OpenLayers.Map({allOverlays: false}),            height: 600,            width: 800,			center: [5, 45],			zoom: 4,			layers: [new OpenLayers.Layer.WMS(					"Global Imagery",					"http://maps.opengeo.org/geowebcache/service/wms",					{layers: "bluemarble"},					{buffer: 0,                    visibility: false					})					//{layers: "openstreetmap"					//,format: "image/png",					//bgcolor: '#A1BDC4'},					//{wrapDateLine: true, transitionEffect: 'resize'}					,					//new OpenLayers.Layer.OSM({visibility: false}),
 //se metto un nome sbiella...					layer_reg			]        });
		new Ext.grid.GridPanel({			title: "Feature Grid",			renderTo: 'layerGrid',			height: 200, width: 200,			autoScroll: true,			store: mapPanel.layers,			columns: [{name: 'name', heading: 'Name'}]		});			});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110617/a999aecc/attachment.htm 


More information about the Users mailing list