Hi, On Mon, Jul 6, 2009 at 8:11 AM, Anthony Masinton<[email protected]> wrote: > I'm a new user of OL and would like some help with getting feature > names from GML. > > I have a layer based on a GML file with several polygons in it. > Using the select-feature-openpopup example I am able to highlight > each polygon and display a popup which gives the feature's ID > (feature.id) and its area - as shown in the example. > > What I would like to display in the popup instead is the name of the > feature from the GML file's gml:name tag for the selected feature.
I have not tried this, but looking at the GML format code it seems that using feature.attributes.name instead of feature.id in the example should do the trick. Regards, Andreas. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
