hi,
i've been trying to display feature information in a popup for a while
now.. but there seem to be some problem. it would be of great help if you
could tell me where i went wrong.

var map,info;
function init(){
var india_bounds = new OpenLayers.Bounds(68,4,98,37);
map= new OpenLayers.Map('map',{maxExtent:india_bounds});
var road= new OpenLayers.Layer.WMS("OpenLayers WMS,"
http://localhost:8081/geoserver/wms/r...<http://localhost:8081/geoserver/wms/reflect?layers=BIS:xyz&styles=&width=780&height=330&srs=EPSG:4326%22>
,
{layers:'BIS:xyz'});
map.addLayers([road]);
map.zoomToMapExtent();
controls.push(new OpenLayers.Control.WMSGetFeatureInfo({
autoActivate: true,
infoFormat: "application/vnd.ogc.gml",
maxFeatures: 3,
eventListeners: {
"getfeatureinfo": function(e) {
var items = [];
Ext.each(e.features, function(feature) {
items.push({
xtype: "propertygrid",
title: feature.fid,
source: feature.attributes
});
});
new GeoExt.Popup({
title: "Feature Info",
width: 200,
height: 200,
layout: "accordion",
map: app.mapPanel,
location: e.xy,
items: items
}).show();
}
}
}));

i am new to geoserver and geoext.. so i really can't find errors.
regards,
neha.
_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to