Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. feature Control, a "button" control
  2. action = new GeoExt.Action({
  3. control: new OpenLayers.Control.WMSGetFeatureInfo({
  4. autoActivate: true,
  5. infoFormat: "application/vnd.ogc.gml",
  6. maxFeatures: 6,
  7. layers: [layers1],
  8. propertyName: "name1,name2,name3",
  9.  
  10. eventListeners: {
  11. "getfeatureinfo": function(e) {
  12. var items = [];
  13. Ext.each(e.features, function(feature) {
  14.  
  15. items.push({
  16. xtype: "propertygrid",
  17. title: feature.fid, // here i change it to feature.name1 it doesn't work
  18. source: feature.attributes
  19.  
  20. });
  21. });
  22. new GeoExt.Popup({
  23. title: "infos",
  24. width: 250,
  25. height: 300,
  26. layout: "accordion",
  27. map: map,
  28. location: e.xy,
  29. items: items
  30. }).show();
  31. }
  32. }
  33. }),
  34. map: map,
  35. text: "infos",
  36. tooltip: "Infos "
  37. });
  38. actions["infos"] = action;
  39. toolbarItems.push(action);
  40. toolbarItems.push("-");
  41.  
  42. propertyName: "name1,name2,name3",
  43.  
  44. vendorParams: {
  45. propertyName: "name1"
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement