[Users] Fill fieldset from grid
Robert Buckley
robertdbuckley at yahoo.com
Thu Mar 31 15:59:58 CEST 2011
http://maps.zgb.de:8080/geoserver/www/testing/permalink.html
at the moment I just reset the fields to empty when the user clicks on the
vector, but I would obviously like to fill the fieldset form with the
corresponding attributes.
In fact I´d like to lots of other things like use the url in the last field (you
have scroll down) on the popup to display an image in the form as well
Thanks for any tips,
Robert
________________________________
Von: Matt Priour <mpriour at kestrelcomputer.com>
An: Robert Buckley <robertdbuckley at yahoo.com>
Gesendet: Donnerstag, den 31. März 2011, 15:44:40 Uhr
Betreff: Re: [Users] Fill fieldset from grid
I think I would need to see a more fully functioning example or demo site to
understand what is not working here & how to help
Matt Priour
From: Robert Buckley
Sent: Thursday, March 31, 2011 7:45 AM
To: users at geoext.org
Subject: [Users] Fill fieldset from grid
Hi,
It´s probably pretty easy to do, but I can´t find a good way to do this.
With this code the map centers in on the feature and the fieldset is populated
with the attributes of a grid (red)
// 1 x Click in grid
gridPanel.on('rowclick', function(){
gridPanel.getSelectionModel().each(function(rec){
var feature = rec.get("feature");
InfoPanel.getForm().loadRecord(rec);
mapPanel.map.setCenter(feature.geometry.getBounds().getCenterLonLat(), 12);
})
});
This is the code to create the popup
// register a listener for the feature selection and unselection
layer.events.on({
featureselected: function(event){
popup = new GeoExt.Popup({
title: "Feature Attributes",
feature: event.feature,
collapsible: true,
layout: "fit",
height: 330,
panIn: true,
width: 270,
unpinnable: true,
border: false,
listeners: {
close: function(){
select.unselectAll();
}
},
items: [new Ext.grid.PropertyGrid({
autoHeight: true,
source: event.feature.attributes
})]
});
popup.show();
},
featureunselected: function(event){
popup.destroy();
}
});
I want to fill the form also by clicking on the vector features, but cannot see
how to do it. I have tried many things, but they all fail.
Could anyone see what I have to do?
yours,
Robert
________________________________
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110331/5f9b5eb1/attachment-0001.htm
More information about the Users
mailing list