Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- feature Control, a "button" control
- action = new GeoExt.Action({
- control: new OpenLayers.Control.WMSGetFeatureInfo({
- autoActivate: true,
- infoFormat: "application/vnd.ogc.gml",
- maxFeatures: 6,
- layers: [layers1],
- propertyName: "name1,name2,name3",
- eventListeners: {
- "getfeatureinfo": function(e) {
- var items = [];
- Ext.each(e.features, function(feature) {
- items.push({
- xtype: "propertygrid",
- title: feature.fid, // here i change it to feature.name1 it doesn't work
- source: feature.attributes
- });
- });
- new GeoExt.Popup({
- title: "infos",
- width: 250,
- height: 300,
- layout: "accordion",
- map: map,
- location: e.xy,
- items: items
- }).show();
- }
- }
- }),
- map: map,
- text: "infos",
- tooltip: "Infos "
- });
- actions["infos"] = action;
- toolbarItems.push(action);
- toolbarItems.push("-");
- propertyName: "name1,name2,name3",
- vendorParams: {
- propertyName: "name1"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement