Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/scripts/viewport.jsp @ 983:45ea5feb94c0
Make GetFeatureInforRequest-Url configurable. Change responsetype of GetFeatureInfo-request to gml
gnv/trunk@1165 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 07 Jun 2010 12:35:49 +0000 |
parents | cd9414538f10 |
children | cfc7bd35ee0b |
comparison
equal
deleted
inserted
replaced
982:cd9414538f10 | 983:45ea5feb94c0 |
---|---|
15 * settings inline the code! | 15 * settings inline the code! |
16 */ | 16 */ |
17 PROJECTION = "EPSG:4326"; | 17 PROJECTION = "EPSG:4326"; |
18 MAX_EXTENT = new OpenLayers.Bounds(-17.44,29.41,40.04,77.66); | 18 MAX_EXTENT = new OpenLayers.Bounds(-17.44,29.41,40.04,77.66); |
19 INITIAL_CENTER = new OpenLayers.LonLat(5, 55); | 19 INITIAL_CENTER = new OpenLayers.LonLat(5, 55); |
20 GETFEATUREINFO_URL = "<%=SessionModelFactory.getInstance().getSessionModel(request).getLocalMapService().getURL()%>"; | |
20 | 21 |
21 Ext.onReady(function() { | 22 Ext.onReady(function() { |
22 | 23 |
23 /* this function call initialized the layers that are defined by the user. | 24 /* this function call initialized the layers that are defined by the user. |
24 * The variable 'layer' and 'layers' are initialized in this function as | 25 * The variable 'layer' and 'layers' are initialized in this function as |
65 title: '<bean:message key="gnviewer.mapclient.controls.zoombox.title"/>' | 66 title: '<bean:message key="gnviewer.mapclient.controls.zoombox.title"/>' |
66 } | 67 } |
67 ), | 68 ), |
68 info : new OpenLayers.Control.WMSGetFeatureInfo({ | 69 info : new OpenLayers.Control.WMSGetFeatureInfo({ |
69 displayClass: "olControlFeatureInfo", | 70 displayClass: "olControlFeatureInfo", |
70 url: 'http://fluggs.wupperverband.de/wmsconnector/com.esri.wms.Esrimap/WV_WMS', | 71 url: GETFEATUREINFO_URL, |
71 title: '<bean:message key="gnviewer.mapclient.controls.info.title"/>', | 72 title: '<bean:message key="gnviewer.mapclient.controls.info.title"/>', |
72 queryVisible: true, | 73 queryVisible: true, |
74 infoFormat: 'application/vnd.ogc.gml', | |
73 eventListeners: { | 75 eventListeners: { |
74 getfeatureinfo: function(event) { | 76 getfeatureinfo: function(event) { |
75 mapPanel.map.addPopup(new OpenLayers.Popup.FramedCloud( | 77 mapPanel.map.addPopup(new OpenLayers.Popup.FramedCloud( |
76 "chicken", | 78 "chicken", |
77 mapPanel.map.getLonLatFromPixel(event.xy), | 79 mapPanel.map.getLonLatFromPixel(event.xy), |