Mercurial > dive4elements > gnv-client
diff gnv/src/main/webapp/scripts/olutils.jsp @ 997:f55692e3e0ce
Modified output of the GetfeatureInfo-request.
gnv/trunk@1198 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Fri, 11 Jun 2010 09:25:44 +0000 |
parents | e3301755bd3c |
children | 3665834344a8 |
line wrap: on
line diff
--- a/gnv/src/main/webapp/scripts/olutils.jsp Fri Jun 11 08:25:46 2010 +0000 +++ b/gnv/src/main/webapp/scripts/olutils.jsp Fri Jun 11 09:25:44 2010 +0000 @@ -203,3 +203,35 @@ map.addControl(panel); } +function parseGetFeatureInfoData(event) { + var contentHTML = "<div>"; + var features = event.features; + var first = true; + for (feat in features){ + if (feat != 'remove'){ + var feature = features[feat]; + var attributes = feature.attributes; + if (first){ + first = false; + }else{ + contentHTML += "<br/>"; + } + contentHTML += "<table>"; + for (att in attributes){ + contentHTML += "<tr><td><b>"+att+":</b></td><td>" + attributes[att] + "</td></tr>"; + } + contentHTML += "</table>"; + } + + } + contentHTML += "</div>"; + + mapPanel.map.addPopup(new OpenLayers.Popup.FramedCloud( + "chicken", + mapPanel.map.getLonLatFromPixel(event.xy), + null, + contentHTML, + null, + true + )); +} \ No newline at end of file