changeset 1016:3665834344a8

Issue317: Provide a Comboboy with given WMS instead of an Textfield gnv/trunk@1244 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 29 Jun 2010 15:41:10 +0000
parents c83eeebdf521
children cce6596560e6
files gnv/ChangeLog gnv/src/main/resources/applicationMessages.properties gnv/src/main/resources/applicationMessages_en.properties gnv/src/main/webapp/WEB-INF/config/reachable-servers.conf gnv/src/main/webapp/WEB-INF/jsp/includes/wms_header_inc.jsp gnv/src/main/webapp/scripts/olutils.jsp gnv/src/main/webapp/scripts/viewport.jsp
diffstat 7 files changed, 81 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Tue Jun 29 06:25:28 2010 +0000
+++ b/gnv/ChangeLog	Tue Jun 29 15:41:10 2010 +0000
@@ -1,3 +1,23 @@
+2010-06-29  Tim Englich  <tim.englich@intevation.de>
+
+	  ISSU317
+
+	* src/main/resources/applicationMessages*.properties: 
+	  Added i18n support for the Name of the GNV Web Map Service.
+
+	* src/main/webapp/WEB-INF/jsp/includes/wms_header_inc.jsp: 
+	  Added variable capfile to be able to reference the combobox directly.
+
+	* src/main/webapp/WEB-INF/config/reachable-servers.conf: 
+	  Added configurationfile to fill the combobox with WMS.
+
+	* src/main/webapp/scripts/olutils.jsp: 
+	  Read URL to Capabilities-Document from selected Item in Combobox.
+	  Also switched to singleTile mode for inserted Layers.
+
+	* src/main/webapp/scripts/viewport.jsp: 
+	  Switched Inputfile for GetCapabilities URl to an Combobox.
+
 2010-06-29  Tim Englich  <tim.englich@intevation.de>
 
 	* src/main/webapp/images/ol/cloud-popup-relative.png:
--- a/gnv/src/main/resources/applicationMessages.properties	Tue Jun 29 06:25:28 2010 +0000
+++ b/gnv/src/main/resources/applicationMessages.properties	Tue Jun 29 15:41:10 2010 +0000
@@ -147,3 +147,4 @@
 gnviewer.mapclient.controls.navigate.title = Verschieben der Karte
 gnviewer.mapclient.controls.zoombox.title = Zum Zoomen ziehen Sie eine Box auf, indem Sie klicken und ziehen
 gnviewer.mapclient.controls.info.title = Detailinformationen zu Objekten durch Klicken in die Karte
+gnviewer.mapclient.wms.local.service.name = GNV Web Map Service
--- a/gnv/src/main/resources/applicationMessages_en.properties	Tue Jun 29 06:25:28 2010 +0000
+++ b/gnv/src/main/resources/applicationMessages_en.properties	Tue Jun 29 15:41:10 2010 +0000
@@ -145,3 +145,4 @@
 gnviewer.mapclient.controls.navigate.title = Moves the map
 gnviewer.mapclient.controls.zoombox.title = Zoom by clicking an moving the mouse to generate a box
 gnviewer.mapclient.controls.info.title = Identify features by clicking
+gnviewer.mapclient.wms.local.service.name = GNV Web Map Service
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv/src/main/webapp/WEB-INF/config/reachable-servers.conf	Tue Jun 29 15:41:10 2010 +0000
@@ -0,0 +1,34 @@
+['BSH WMS Background','http://gdisrv.bsh.de/arcgis/services/Background/Background/MapServer/WMSServer'],
+['BSH WMS CONTIS Administration','http://gdisrv.bsh.de/arcgis/services/CONTIS/Administration/MapServer/WMSServer'],
+['BSH WMS CONTIS Facilities','http://gdisrv.bsh.de/arcgis/services/CONTIS/Facilities/MapServer/WMSServer'],
+['BSH WMS NAUTHIS Skin of the Earth','http://gdisrv.bsh.de/arcgis/services/Nauthis/SkinOfTheEarth/MapServer/WMSServer '],
+['BSH WMS NAUTHIS Navigational Aids','http://gdisrv.bsh.de/arcgis/services/Nauthis/NavigationalAids/MapServer/WMSServer '],
+['BSH WMS NAUTHIS Seawards Limits','http://gdisrv.bsh.de/arcgis/services/Nauthis/SeawardsLimits/MapServer/WMSServer'],
+['BSH WMS NAUTHIS Rocks Wrecks Obstructions','http://gdisrv.bsh.de/arcgis/services/Nauthis/RocksWrecksObstructions/MapServer/WMSServer'],
+['BSH WMS NAUTHIS Hydrography','http://gdisrv.bsh.de/arcgis/services/Nauthis/Hydrography/MapServer/WMSServer'],
+['BSH WMS NAUTHIS Topography','http://gdisrv.bsh.de/arcgis/services/Nauthis/Topography/MapServer/WMSServer'],
+['BSH WMS Water Pollution Reports','http://gdisrv.bsh.de/arcgis/services/WaterPollution/WaterPollution/MapServer/WMSServer'],
+['BSH WMS Marine Environmental Monitoring Network','http://gdisrv.bsh.de/arcgis/services/MARNET/MARNET/MapServer/WMSServer'],
+['BSH WMS Remote Sensing Sea Surface Temperature','http://gdisrv.bsh.de/arcgis/services/RemoteSensing/SeaSurfaceTemperature/MapServer/WMSServer'],
+['BSH WMS Sea Surface Temperature Analysis','http://gdisrv.bsh.de/arcgis/services/SeaSurfaceTemperature/SeaSurfaceTemperature/MapServer/WMSServer'],
+['BSH WMS Prediction Model Current','http://gdisrv.bsh.de/arcgis/services/PredictionModel/WaterCurrent/MapServer/WMSServer'],
+['BSH WMS Prediction Model Water Level NN','http://gdisrv.bsh.de/arcgis/services/PredictionModel/WaterLevelNN/MapServer/WMSServer'],
+['BSH WMS Prediction Model Water Temperature','http://gdisrv.bsh.de/arcgis/services/PredictionModel/WaterTemperature/MapServer/WMSServer'],
+['BSH WMS Prediction Model Salinity','http://gdisrv.bsh.de/arcgis/services/PredictionModel/WaterSalinity/MapServer/WMSServer'],
+['BSH WMS SGE Additional Information','http://gdisrv.bsh.de/arcgis/services/SGE/AdditionalInformation/MapServer/WMSServer'],
+['BSH WMS SGE Seabed Sediments','http://gdisrv.bsh.de/arcgis/services/SGE/SeabedSediments/MapServer/WMSServer'],
+['BSH WMS SGE Subsurface Sediments','http://gdisrv.bsh.de/arcgis/services/SGE/SubsurfaceSediments/MapServer/WMSServer'],
+['BSH WMS SGE Survey','http://gdisrv.bsh.de/arcgis/services/SGE/Survey/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Sediment PCB','http://gdisrv.bsh.de/arcgis/services/MUDAB/SedimentPCB/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Sediment Metalle','http://gdisrv.bsh.de/arcgis/services/MUDAB/SedimentMetals/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Sediment HCH','http://gdisrv.bsh.de/arcgis/services/MUDAB/SedimentHCH/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Wasser PCB','http://gdisrv.bsh.de/arcgis/services/MUDAB/WaterPCB/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Wasser Nährstoffe','http://gdisrv.bsh.de/arcgis/services/MUDAB/WaterNutrients/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Wasser Metalle','http://gdisrv.bsh.de/arcgis/services/MUDAB/WaterMetals/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Wasser HCH','http://gdisrv.bsh.de/arcgis/services/MUDAB/WaterHCH/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Wasser Physik','http://gdisrv.bsh.de/arcgis/services/MUDAB/WaterPhysical/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Wasser PAH','http://gdisrv.bsh.de/arcgis/services/MUDAB/WaterPAH/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Wasser Pestizide','http://gdisrv.bsh.de/arcgis/services/MUDAB/WaterPesticide/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Biota PCB','http://gdisrv.bsh.de/arcgis/services/MUDAB/BiotaPCB/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Biota Metalle','http://gdisrv.bsh.de/arcgis/services/MUDAB/BiotaMetals/MapServer/WMSServer'],
+['BSH WMS MUDAB BLMP Biota HCH','http://gdisrv.bsh.de/arcgis/services/MUDAB/BiotaHCH/MapServer/WMSServer']
\ No newline at end of file
--- a/gnv/src/main/webapp/WEB-INF/jsp/includes/wms_header_inc.jsp	Tue Jun 29 06:25:28 2010 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/wms_header_inc.jsp	Tue Jun 29 15:41:10 2010 +0000
@@ -33,7 +33,7 @@
          
          <!-- save necessary variables here -->
          <script type="text/javascript">
-             var options, layer, extent, map, mapPanel, infoControls;
+             var options, layer, extent, map, mapPanel, infoControls, capfield;
              var controls,layers, mouseLoc, grid;
              var infoActive = false;
          </script>
--- a/gnv/src/main/webapp/scripts/olutils.jsp	Tue Jun 29 06:25:28 2010 +0000
+++ b/gnv/src/main/webapp/scripts/olutils.jsp	Tue Jun 29 15:41:10 2010 +0000
@@ -97,7 +97,6 @@
             format: "image/png",
             transparent: true
         });
-        copy.singletile = true;
         mapPanel.layers.add(copy);
         }
      }
@@ -126,16 +125,18 @@
 
 
 function updateCapabilities() {
-    var ele = Ext.Element.get('capfield');
 
-    var url     = ele.getValue();
+    var url     = capfield.getValue();
     var service = "SERVICE=WMS";
     var request = "REQUEST=GetCapabilities";
+    var version = "VERSION=1.1.1";
     url = urlAppend(url, service);
     url = urlAppend(url, request);
+    url = urlAppend(url, version);
 
     store = new GeoExt.data.WMSCapabilitiesStore({
-        url: url
+        url: url,
+        layerOptions: {singleTile: true}
     });
     store.load({
         callback: showWarning
--- a/gnv/src/main/webapp/scripts/viewport.jsp	Tue Jun 29 06:25:28 2010 +0000
+++ b/gnv/src/main/webapp/scripts/viewport.jsp	Tue Jun 29 15:41:10 2010 +0000
@@ -146,13 +146,27 @@
         contentEl: 'cap'
         
     });
-
-    var capfield = new Ext.form.TextField({
+    
+    var capstore = new Ext.data.SimpleStore({
+        fields: ['name','url'],
+        data : [['<bean:message key="gnviewer.mapclient.wms.local.service.name"/>','<%=mapService.getURL()%>'],<jsp:include page="/WEB-INF/config/reachable-servers.conf" />]
+    });
+    capfield = new Ext.form.ComboBox({
         id: 'capfield',
-        region: 'east',
-        width: '100%',
-        renderTo: 'urlinput'
+        store: capstore,
+        displayField:'name',
+        width: 245,
+        valueField: 'url',
+        mode: 'local',
+        triggerAction: 'all',
+        selectOnFocus: true,
+        renderTo: 'urlinput',
+        editable: false,
+        value: '<%=mapService.getURL()%>'
+        
     });
+    
+
 
     var capbutton = new Ext.Button({
         id: 'capbutton',

http://dive4elements.wald.intevation.org