[Users] GetFeature Popup [Sec=Unclassified]
Miles Jordan
Miles.Jordan at aad.gov.au
Mon Nov 9 00:21:19 CET 2009
Eric Lemoine wrote:
> On Fri, Nov 6, 2009 at 5:19 AM, Miles Jordan <Miles.Jordan at aad.gov.au>
> wrote:
> > Hi,
> >
> > I haven't been able to find a comprehensive example of how to show a
> > feature's attributes in a Popup.
> >
> > I've seen the example of creating a popup, which works fine. I've
> > also seen the example of showing DescribeFeatureType results in a
> > popup, ok.
> >
> > So I have an OpenLayers map that has a WMS Layer on it, and a
> > GetFeature control that uses the WFS.fromWMSLayer Protocol in
> > conjunction with a Vector Layer to highlight a selected Feature.
> >
> > That works fine and I can get a popup on my map when I click and
> > select a feature. Now I am wondering how I get the selected Feature's
> > attributes into some form that I can use in a Ext GridPanel inside the
> > popup.
>
> Hi. The GeoExt popup is an Ext window, so you can add any component to
> a popup, a grid panel for example. This grid panel can be configured
> with a GeoExt feature store, so that features can easily be added in
> the grid. Look at
> <http://dev.geoext.org/trunk/geoext/examples/feature-grid.html> to
> understand how to create a grid of features.
Oh, well I sort of get it. I mean I can put the attributes in using regular HTML, but I'm still not quite sure about using a GridPanel with the FeatureStore.
The demo shows setting up both the FeatureStore and GridPanel with attributes 'name' and 'elevation'. So I can get that to work if I choose two attributes from one of my layers. But what if I wanted to use the same piece of code to display the attributes for whatever feature type is being clicked? Is that possible perhaps by using a describeFeatureType request, or would I have to hard-code the attributes that I want to be displayed?
Thanks for your help Eric.
-Miles
___________________________________________________________________________
Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
Visit our web site at http://www.antarctica.gov.au/
___________________________________________________________________________
More information about the Users
mailing list