| 12 | == WMS GetFeatureInfo == |
| 13 | * http://dev.openlayers.org/releases/OpenLayers-2.9.1/examples/getfeatureinfo-popup.html |
| 14 | * A single one for the server - not 1/layer!? |
| 15 | {{{ |
| 16 | info = new OpenLayers.Control.WMSGetFeatureInfo({ |
| 17 | url: 'http://demo.opengeo.org/geoserver/wms', |
| 18 | title: 'Identify features by clicking', |
| 19 | queryVisible: true, |
| 20 | eventListeners: { |
| 21 | getfeatureinfo: function(event) { |
| 22 | map.addPopup(new OpenLayers.Popup.FramedCloud( |
| 23 | "chicken", |
| 24 | map.getLonLatFromPixel(event.xy), |
| 25 | null, |
| 26 | event.text, |
| 27 | null, |
| 28 | true |
| 29 | )); |
| 30 | } |
| 31 | } |
| 32 | }); |
| 33 | map.addControl(info); |
| 34 | info.activate(); |
| 35 | }}} |
| 36 | |