← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 506: (GIS, minor) Map layer GUI enhanced. Variables renamed.

 

------------------------------------------------------------
revno: 506
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-08-25 19:46:52 +0200
message:
  (GIS, minor) Map layer GUI enhanced. Variables renamed.
modified:
  gis/dhis-web-mapping/src/main/webapp/mapping/geostat/config.js
  gis/dhis-web-mapping/src/main/webapp/mapping/geostat/geostat.js
  gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'gis/dhis-web-mapping/src/main/webapp/mapping/geostat/config.js'
--- gis/dhis-web-mapping/src/main/webapp/mapping/geostat/config.js	2009-08-21 10:54:34 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mapping/geostat/config.js	2009-08-25 17:46:52 +0000
@@ -11,6 +11,7 @@
 
 //  Layers and widgets
 
+    GEOJSON_URL = 'geojson/';
     INIT_URL = 'geojson/init';
     CHOROPLETH_LAYERNAME = 'Thematic map';
 

=== modified file 'gis/dhis-web-mapping/src/main/webapp/mapping/geostat/geostat.js'
--- gis/dhis-web-mapping/src/main/webapp/mapping/geostat/geostat.js	2009-08-25 15:18:01 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mapping/geostat/geostat.js	2009-08-25 17:46:52 +0000
@@ -290,7 +290,7 @@
                         }),
                         'strategies': [new OpenLayers.Strategy.Fixed()],
                         'protocol': new OpenLayers.Protocol.HTTP({
-                            'url': 'geojson/' + mapLayers[i].mapSource,
+                            'url': GEOJSON_URL + mapLayers[i].mapSource,
                             'format': new OpenLayers.Format.GeoJSON()
                         })
                     })
@@ -1437,11 +1437,14 @@
                     }),
                     'strategies': [new OpenLayers.Strategy.Fixed()],
                     'protocol': new OpenLayers.Protocol.HTTP({
-                        'url': 'geojson/' + mlmsf,
+                        'url': GEOJSON_URL + mlmsf,
                         'format': new OpenLayers.Format.GeoJSON()
                     })
                 })
             );
+            
+            Ext.getCmp('maplayername_tf').reset();
+            Ext.getCmp('maplayermapsourcefile_tf').reset();
         }
     });
     
@@ -1721,24 +1724,6 @@
     shapefilePanel.hide();
     mapLayerPanel.hide();
     
-    widgets = [choropleth,
-                viewPanel,
-                legendsetPanel,
-                shapefilePanel,
-                mapping,
-                mapLayerPanel,
-                adminPanel];
-
-    var mapPanel = new GeoExt.MapPanel({
-        region: 'center',
-        id: 'center',
-        height: 1000,
-        width: 1000,
-        map: map,
-        title: '',
-        zoom: 3
-    });
-    
     var layerTreeConfig = [{
         nodeType: 'gx_baselayercontainer',
         text: 'Background'
@@ -1833,7 +1818,15 @@
                     border: true,
                     frame: true
                 },
-                items: widgets 
+                items: [
+                    choropleth,
+                    viewPanel,
+                    legendsetPanel,
+                    shapefilePanel,
+                    mapping,
+                    mapLayerPanel,
+                    adminPanel
+                ]
             },
             {
                 xtype: 'gx_mappanel',

=== modified file 'gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js'
--- gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js	2009-08-08 17:45:41 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js	2009-08-25 17:46:52 +0000
@@ -718,7 +718,7 @@
                 }
             }
             else {
-                this.setUrl('geojson/' + URL);
+                this.setUrl(GEOJSON_URL + URL);
             }
         }