Hi group. What i need to do is display a list of search results in the grid panel. When user clicks on a record, highlight the feature and display a popup with the feature attributes. The code below does all except the popup. How would i go about displaying the popup?
Regards,
Herman
*new* Ext.grid.GridPanel({
title: 'Search results',
region: 'center',
ds: store,
sm: sm,
autoSizeColumns: *true*,
viewConfig: {
forceFit: *true*,
autoFill: *true*
},
height: 300,
columns: [{
header: 'mapunit',
dataIndex: 'mapunit',
width: 50
}
],
listeners: {
'rowclick': {
'fn': *function*(grid, index, evt) {
*var* r =
grid.getStore().getAt(index);
*var* feature = r.get('feature');
*var* a = feature.attributes;
vectorLayer.destroyFeatures();
vectorLayer.addFeatures(feature);
vectorLayer.redraw();
*var* bounds =
feature.geometry.getBounds();
map.setCenter(bounds.getCenterLonLat(),map.getZoomForExtent(bounds));
// popup code goes here?
}
}
},
bbar: [{
text: 'Clear highlight',
handler: *function*() {
vectorLayer.removeFeatures(vectorLayer.features);
}
}
})
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
