← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1999: (GIS) Misc minor improvements.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 1999 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: trunk
timestamp: Sun 2010-08-29 18:13:53 +0530
message:
  (GIS) Misc minor improvements.
modified:
  dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.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 'dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java'
--- dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java	2010-08-28 10:27:45 +0000
+++ dhis-2/dhis-services/dhis-service-mapping/src/main/java/org/hisp/dhis/mapping/DefaultMappingService.java	2010-08-29 06:55:27 +0000
@@ -233,7 +233,7 @@
         for ( OrganisationUnit organisationUnit : parent.getChildren() )
         {
             if ( organisationUnit.hasCoordinates() )
-            {
+            {    
                 Double value = aggregationService.getAggregatedIndicatorValue( indicator, period.getStartDate(), period.getEndDate(), organisationUnit );
                 
                 value = value != null ? value : 0; // TODO improve

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties	2010-08-03 18:13:56 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties	2010-08-29 12:11:06 +0000
@@ -193,3 +193,5 @@
 organisation_units_assigned			= organisation units assigned
 parent_orgunit						= Parent orgunit
 delete_map							= Delete map
+aggregating_map_values				= Aggregating map values..
+loading_geojson						= Loading geojson..

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm	2010-08-03 18:13:56 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm	2010-08-29 12:11:06 +0000
@@ -191,4 +191,6 @@
 var i18n_organisation_units_assigned = '$encoder.jsEscape($i18n.getString( 'organisation_units_assigned' ) , "'")';
 var i18n_the_view = '$encoder.jsEscape($i18n.getString( 'the_view' ) , "'")';
 var i18n_parent_orgunit = '$encoder.jsEscape($i18n.getString( 'parent_orgunit' ) , "'")';
-var i18n_delete_map = '$encoder.jsEscape($i18n.getString( 'delete_map' ) , "'")';
\ No newline at end of file
+var i18n_delete_map = '$encoder.jsEscape($i18n.getString( 'delete_map' ) , "'")';
+var i18n_aggregating_map_values = '$encoder.jsEscape($i18n.getString( 'aggregating_map_values' ) , "'")';
+var i18n_loading_geojson = '$encoder.jsEscape($i18n.getString( 'loading_geojson' ) , "'")';
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js	2010-08-26 16:20:21 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js	2010-08-29 12:11:06 +0000
@@ -201,18 +201,24 @@
         this.requestSuccess(request);
         
         if (ACTIVEPANEL == thematicMap) {
+            if (!choropleth.isFormComplete()) {
+                MASK.hide();
+            }
             choropleth.classify(false);
         }
         else if (ACTIVEPANEL == thematicMap2) {
+            if (!proportionalSymbol.isFormComplete()) {
+                MASK.hide();
+            }
             proportionalSymbol.classify(false);
         }
         else if (ACTIVEPANEL == organisationUnitAssignment) {
             mapping.classify(false);
         }
+        
+        
 
-		// if (URL) {
-			// loadMapData(ACTIVEPANEL, false);
-		// }
+        // MASK.hide();
     },
 
     /**

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2010-08-27 19:17:53 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2010-08-29 12:30:29 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2008  Camptocamp
+ * Copyright (C) 2007-2008  Camptocamp|
  *
  * This file is part of MapFish Client
  *
@@ -171,6 +171,32 @@
 		});
 	},
     
+    isFormComplete: function() {
+        if (!Ext.getCmp('indicator_cb').getValue() && !Ext.getCmp('dataelement_cb').getValue()) {
+            return false;
+        }
+        if (!Ext.getCmp('period_cb').getValue()) {
+            return false;
+        }
+        if (!Ext.getCmp('map_cb').getValue() && !Ext.getCmp('map_tf').getValue()) {
+            return false;
+        }
+        if (Ext.getCmp('maplegendtype_cb').getValue() == map_legend_type_predefined) {
+            if (!Ext.getCmp('maplegendset_cb').getValue()) {
+                return false;
+            }
+        }
+        else {
+            if (Ext.getCmp('method_cb').getValue() == classify_with_bounds) {
+                if (!Ext.getCmp('bounds_tf').getValue()) {
+                    return false;
+                }
+            }
+        }
+        
+        return true;
+    },
+    
     initComponent: function() {
     
         mapViewStore = new Ext.data.JsonStore({
@@ -195,6 +221,7 @@
                                     
 									Ext.getCmp('mapsource_cb').setValue(MAPSOURCE);
                                     Ext.getCmp('mapview_cb').setValue(MAPVIEW.id);
+                                    VALUETYPE.polygon = MAPVIEW.mapValueType;
                                     
                                     if (MAPVIEW.mapLegendType == map_legend_type_automatic) {
                                         LEGEND[thematicMap].type = map_legend_type_automatic;
@@ -210,7 +237,7 @@
                                         if (MAPVIEW.method == classify_with_bounds) {
                                             Ext.getCmp('numClasses_cb').hideField();
                                             Ext.getCmp('bounds_tf').showField();
-                                            Ext.getCmp('bounds_tf').setValue('80,100');
+                                            Ext.getCmp('bounds_tf').setValue(MAPVIEW.bounds);
                                         }
                                         else {
                                             Ext.getCmp('bounds_tf').hideField();
@@ -236,8 +263,6 @@
 									Ext.getCmp('mapvaluetype_cb').setValue(MAPVIEW.mapValueType);
 										
 									if (MAPVIEW.mapValueType == map_value_type_indicator) {
-                                        VALUETYPE.polygon = map_value_type_indicator;
-                                        
                                         Ext.getCmp('indicator_cb').showField();
                                         Ext.getCmp('indicatorgroup_cb').showField();
                                         Ext.getCmp('dataelementgroup_cb').hideField();
@@ -249,8 +274,6 @@
                                         indicatorStore.load();
                                     }
                                     else if (MAPVIEW.mapValueType == map_value_type_dataelement) {
-                                        VALUETYPE.polygon = map_value_type_dataelement;
-                                        
                                         Ext.getCmp('indicator_cb').hideField();
                                         Ext.getCmp('indicatorgroup_cb').hideField();
                                         Ext.getCmp('dataelementgroup_cb').showField();
@@ -410,7 +433,7 @@
                                         var name = Ext.util.JSON.decode(r.responseText).organisationUnit.name;
                                         Ext.getCmp('map_tf').setValue(name);
                                         Ext.getCmp('map_tf').value = MAPVIEW.mapSource;
-                                        choropleth.loadById(MAPVIEW.mapSource);
+                                        choropleth.loadFromDatabase(MAPVIEW.mapSource);
                                     },
                                     failure: function() {
                                         alert('Error: getOrganisationUnit');
@@ -419,7 +442,7 @@
                             }
                             else {
                                 Ext.getCmp('map_cb').setValue(MAPVIEW.mapSource);
-                                choropleth.loadByUrl(MAPVIEW.mapSource);
+                                choropleth.loadFromFile(MAPVIEW.mapSource);
                             }
                         }
                     }
@@ -525,7 +548,7 @@
                                     if (MAPVIEW.method == classify_with_bounds) {
                                         Ext.getCmp('numClasses_cb').hideField();
                                         Ext.getCmp('bounds_tf').showField();
-                                        Ext.getCmp('bounds_tf').setValue('80,100');
+                                        Ext.getCmp('bounds_tf').setValue(MAPVIEW.bounds);
                                     }
                                     else {
                                         Ext.getCmp('bounds_tf').hideField();
@@ -858,7 +881,7 @@
                         }
                         
                         if (Ext.getCmp('map_cb').getValue() != choropleth.newUrl) {
-                            choropleth.loadByUrl(Ext.getCmp('map_cb').getValue());
+                            choropleth.loadFromFile(Ext.getCmp('map_cb').getValue());
                         }
                     },
                     scope: this
@@ -934,17 +957,26 @@
                                     },
                                     {
                                         xtype: 'panel',
-                                        layout: 'fit',
+                                        layout: 'table',
                                         items: [
                                             {
                                                 xtype: 'button',
-                                                text: 'OK',
+                                                text: 'Select',
+                                                width: 133,
                                                 handler: function() {
-                                                    if (Ext.getCmp('map_tf').getValue()) {
-                                                        choropleth.loadById(Ext.getCmp('map_tf').value);
+                                                    if (Ext.getCmp('map_tf').getValue() && Ext.getCmp('map_tf').getValue() != choropleth.parentId) {
+                                                        choropleth.loadFromDatabase(Ext.getCmp('map_tf').value);
                                                     }
                                                     Ext.getCmp('orgunit_w').hide();
                                                 }
+                                            },
+                                            {
+                                                xtype: 'button',
+                                                text: 'Cancel',
+                                                width: 133,
+                                                handler: function() {
+                                                    Ext.getCmp('orgunit_w').hide();
+                                                }
                                             }
                                         ]
                                     }
@@ -1222,14 +1254,17 @@
         return [colorA, colorB];
     },
     
-    loadById: function(id) {
+    loadFromDatabase: function(id) {
         if (id != choropleth.parentId || MAPVIEW) {
+            MASK.msg = i18n_loading_geojson;
+            MASK.show();
+            
             choropleth.parentId = id;
             choropleth.setUrl(path_mapping + 'getGeoJson.action?parentId=' + choropleth.parentId);
         }
     },
     
-    loadByUrl: function(url) {
+    loadFromFile: function(url) {
         if (url != choropleth.newUrl) {
             choropleth.newUrl = url;
 
@@ -1316,7 +1351,7 @@
 		choropleth.displayMapLegendTypeFields();
         if (choropleth.validateForm(exception)) {
         
-            MASK.msg = i18n_creating_choropleth;
+            MASK.msg = i18n_aggregating_map_values;
             MASK.show();        
 
             MAPDATA[ACTIVEPANEL].name = Ext.getCmp('map_tf').getValue();
@@ -1392,7 +1427,7 @@
 		choropleth.displayMapLegendTypeFields();
         if (choropleth.validateForm(exception)) {
         
-            MASK.msg = i18n_creating_choropleth;
+            MASK.msg = i18n_aggregating_map_values;
             MASK.show();
             
             Ext.Ajax.request({

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2010-08-26 10:20:31 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2010-08-29 12:30:29 +0000
@@ -170,6 +170,32 @@
 			}
 		});
 	},
+    
+    isFormComplete: function() {
+        if (!Ext.getCmp('indicator_cb2').getValue() && !Ext.getCmp('dataelement_cb2').getValue()) {
+            return false;
+        }
+        if (!Ext.getCmp('period_cb2').getValue()) {
+            return false;
+        }
+        if (!Ext.getCmp('map_cb2').getValue() && !Ext.getCmp('map_tf2').getValue()) {
+            return false;
+        }
+        if (Ext.getCmp('maplegendtype_cb2').getValue() == map_legend_type_predefined) {
+            if (!Ext.getCmp('maplegendset_cb2').getValue()) {
+                return false;
+            }
+        }
+        else {
+            if (Ext.getCmp('method_cb2').getValue() == classify_with_bounds) {
+                if (!Ext.getCmp('bounds_tf2').getValue()) {
+                    return false;
+                }
+            }
+        }
+        
+        return true;
+    },
 	
     initComponent : function() {
     
@@ -189,44 +215,54 @@
                                 params: { id: PARAMETER },
 								success: function(r) {
 									PARAMETER = false;
-                                    MAPVIEW = Ext.util.JSON.decode(r.responseText).mapView[0];
+                                    MAPVIEW = getNumericMapView(Ext.util.JSON.decode(r.responseText).mapView[0]);
                                     MAPSOURCE = MAPVIEW.mapSourceType;
                                     MAP.setCenter(new OpenLayers.LonLat(MAPVIEW.longitude, MAPVIEW.latitude), MAPVIEW.zoom);
 									
 									Ext.getCmp('mapsource_cb').setValue(MAPSOURCE);
                                     Ext.getCmp('mapview_cb2').setValue(MAPVIEW.id);
+                                    VALUETYPE.point = MAPVIEW.mapValueType;
 									
 									if (MAPVIEW.mapLegendType == map_legend_type_automatic) {
-										Ext.getCmp('maplegendtype_cb2').setValue(map_legend_type_automatic);
-										Ext.getCmp('numClasses_cb2').setValue(MAPVIEW.classes);
-										Ext.getCmp('colorA_cf2').setValue(MAPVIEW.colorLow);
-										Ext.getCmp('colorB_cf2').setValue(MAPVIEW.colorHigh);
-										
-										Ext.getCmp('method_cb2').showField();
-										Ext.getCmp('bounds_tf2').hideField();
-										Ext.getCmp('numClasses_cb2').showField();
-										Ext.getCmp('colorA_cf2').showField();
-										Ext.getCmp('colorB_cf2').showField();
-										Ext.getCmp('maplegendset_cb2').hideField();
-									}
+                                        LEGEND[thematicMap2].type = map_legend_type_automatic;
+                                        Ext.getCmp('maplegendtype_cb2').setValue(map_legend_type_automatic);
+                                        Ext.getCmp('maplegendset_cb2').hideField();
+                                        Ext.getCmp('method_cb2').showField();
+                                        Ext.getCmp('method_cb2').setValue(MAPVIEW.method);
+                                        Ext.getCmp('colorA_cf2').showField();
+                                        Ext.getCmp('colorA_cf2').setValue(MAPVIEW.colorLow);
+                                        Ext.getCmp('colorB_cf2').showField();
+                                        Ext.getCmp('colorB_cf2').setValue(MAPVIEW.colorHigh);
+                                        
+                                        if (MAPVIEW.method == classify_with_bounds) {
+                                            Ext.getCmp('numClasses_cb2').hideField();
+                                            Ext.getCmp('bounds_tf2').showField();
+                                            Ext.getCmp('bounds_tf2').setValue(MAPVIEW.bounds);
+                                        }
+                                        else {
+                                            Ext.getCmp('bounds_tf2').hideField();
+                                            Ext.getCmp('numClasses_cb2').showField();
+                                            Ext.getCmp('numClasses_cb2').setValue(MAPVIEW.classes);
+                                        }
+                                    }
 									else if (MAPVIEW.mapLegendType == map_legend_type_predefined) {
                                         LEGEND[thematicMap2].type = map_legend_type_predefined;
-										Ext.getCmp('maplegendtype_cb2').setValue(map_legend_type_predefined);
-										Ext.getCmp('method_cb2').hideField();
-										Ext.getCmp('bounds_tf2').hideField();
-										Ext.getCmp('numClasses_cb2').hideField();
-										Ext.getCmp('colorA_cf2').hideField();
-										Ext.getCmp('colorB_cf2').hideField();
-										Ext.getCmp('maplegendset_cb2').showField();
+                                        Ext.getCmp('maplegendtype_cb2').setValue(map_legend_type_predefined);
+                                        Ext.getCmp('method_cb2').hideField();
+                                        Ext.getCmp('bounds_tf2').hideField();
+                                        Ext.getCmp('numClasses_cb2').hideField();
+                                        Ext.getCmp('colorA_cf2').hideField();
+                                        Ext.getCmp('colorB_cf2').hideField();
+                                        Ext.getCmp('maplegendset_cb2').showField();
+                                        
+                                        Ext.getCmp('maplegendset_cb2').setValue(MAPVIEW.mapLegendSetId);
 										
 										predefinedMapLegendSetStore2.load();
-									}										
+									}
+									
+									Ext.getCmp('mapvaluetype_cb2').setValue(MAPVIEW.mapValueType);
 										
-									Ext.getCmp('mapvaluetype_cb').setValue(MAPVIEW.mapValueType);
-
-                                    if (MAPVIEW.mapValueType == map_value_type_indicator) {
-                                        VALUETYPE.polygon = map_value_type_indicator;
-                                        
+									if (MAPVIEW.mapValueType == map_value_type_indicator) {
                                         Ext.getCmp('indicator_cb2').showField();
                                         Ext.getCmp('indicatorgroup_cb2').showField();
                                         Ext.getCmp('dataelementgroup_cb2').hideField();
@@ -238,8 +274,6 @@
                                         indicatorStore2.load();
                                     }
                                     else if (MAPVIEW.mapValueType == map_value_type_dataelement) {
-                                        VALUETYPE.polygon = map_value_type_dataelement;
-                                        
                                         Ext.getCmp('indicator_cb2').hideField();
                                         Ext.getCmp('indicatorgroup_cb2').hideField();
                                         Ext.getCmp('dataelementgroup_cb2').showField();
@@ -399,7 +433,7 @@
                                         var name = Ext.util.JSON.decode(r.responseText).organisationUnit.name;
                                         Ext.getCmp('map_tf2').setValue(name);
                                         Ext.getCmp('map_tf2').value = MAPVIEW.mapSource;
-                                        proportionalSymbol.loadById(MAPVIEW.mapSource);
+                                        proportionalSymbol.loadFromDatabase(MAPVIEW.mapSource);
                                     },
                                     failure: function() {
                                         alert('Error: getOrganisationUnit');
@@ -408,7 +442,7 @@
                             }
                             else {
                                 Ext.getCmp('map_cb2').setValue(MAPVIEW.mapSource);
-                                proportionalSymbol.loadByUrl(MAPVIEW.mapSource);
+                                proportionalSymbol.loadFromFile(MAPVIEW.mapSource);
                             }
                         }
                     }
@@ -473,7 +507,7 @@
                             method: 'POST',
                             params: { id: mId },
                             success: function(r) {
-                                MAPVIEW = Ext.util.JSON.decode(r.responseText).mapView[0];
+                                MAPVIEW = getNumericMapView(Ext.util.JSON.decode(r.responseText).mapView[0]);
 								MAPSOURCE = MAPVIEW.mapSourceType;
                                 
                                 Ext.getCmp('mapvaluetype_cb2').setValue(MAPVIEW.mapValueType);
@@ -501,17 +535,26 @@
                                 }                                        
 								
 								if (MAPVIEW.mapLegendType == map_legend_type_automatic) {
+                                    LEGEND[thematicMap2].type = map_legend_type_automatic;
 									Ext.getCmp('maplegendtype_cb2').setValue(map_legend_type_automatic);
-									Ext.getCmp('numClasses_cb2').setValue(MAPVIEW.classes);
+                                    Ext.getCmp('maplegendset_cb2').hideField();
+									Ext.getCmp('method_cb2').showField();
+                                    Ext.getCmp('method_cb2').setValue(MAPVIEW.method);
+                                    Ext.getCmp('colorA_cf2').showField();
 									Ext.getCmp('colorA_cf2').setValue(MAPVIEW.colorLow);
+                                    Ext.getCmp('colorB_cf2').showField();
 									Ext.getCmp('colorB_cf2').setValue(MAPVIEW.colorHigh);
-									
-									Ext.getCmp('method_cb2').showField();
-									Ext.getCmp('bounds_tf2').hideField();
-									Ext.getCmp('numClasses_cb2').showField();
-									Ext.getCmp('colorA_cf2').showField();
-									Ext.getCmp('colorB_cf2').showField();
-									Ext.getCmp('maplegendset_cb2').hideField();
+                                    
+                                    if (MAPVIEW.method == classify_with_bounds) {
+                                        Ext.getCmp('numClasses_cb2').hideField();
+                                        Ext.getCmp('bounds_tf2').showField();
+                                        Ext.getCmp('bounds_tf2').setValue(MAPVIEW.bounds);
+                                    }
+                                    else {
+                                        Ext.getCmp('bounds_tf2').hideField();
+                                        Ext.getCmp('numClasses_cb2').showField();
+                                        Ext.getCmp('numClasses_cb2').setValue(MAPVIEW.classes);
+                                    }
 								}
 								else if (MAPVIEW.mapLegendType == map_legend_type_predefined) {
                                     LEGEND[thematicMap2].type = map_legend_type_predefined;
@@ -838,7 +881,7 @@
                         }
                         
                         if (Ext.getCmp('map_cb2').getValue() != proportionalSymbol.newUrl) {
-                            proportionalSymbol.loadByUrl(Ext.getCmp('map_cb2').getValue());
+                            proportionalSymbol.loadFromFile(Ext.getCmp('map_cb2').getValue());
                         }
                     },
                     scope: this
@@ -914,17 +957,26 @@
                                     },
                                     {
                                         xtype: 'panel',
-                                        layout: 'fit',
+                                        layout: 'table',
                                         items: [
                                             {
                                                 xtype: 'button',
-                                                text: 'OK',
+                                                text: 'Select',
+                                                width: 133,
                                                 handler: function() {
-                                                    if (Ext.getCmp('map_tf2').getValue()) {
-                                                        proportionalSymbol.loadById(Ext.getCmp('map_tf2').value);
+                                                    if (Ext.getCmp('map_tf2').getValue() && Ext.getCmp('map_tf2').getValue() != choropleth.parentId) {
+                                                        proportionalSymbol.loadFromDatabase(Ext.getCmp('map_tf2').value);
                                                     }
                                                     Ext.getCmp('orgunit_w2').hide();
                                                 }
+                                            },
+                                            {
+                                                xtype: 'button',
+                                                text: 'Cancel',
+                                                width: 133,
+                                                handler: function() {
+                                                    Ext.getCmp('orgunit_w2').hide();
+                                                }
                                             }
                                         ]
                                     }
@@ -1064,16 +1116,16 @@
             store: new Ext.data.SimpleStore({
                 fields: ['value', 'text'],
                 data: [
-					[1, i18n_equal_intervals],
-					[2, i18n_equal_group_count],
-					[0, i18n_fixed_breaks]
+					[2, i18n_equal_intervals],
+					[3, i18n_equal_group_count],
+					[1, i18n_fixed_breaks]
 				]
             }),
             listeners: {
                 'select': {
                     fn: function() {
-                        if (Ext.getCmp('method_cb2').getValue() == 0 && Ext.getCmp('method_cb2').getValue() != LEGEND[thematicMap2].method) {
-							LEGEND[thematicMap2].method = 0;
+                        if (Ext.getCmp('method_cb2').getValue() == classify_with_bounds && Ext.getCmp('method_cb2').getValue() != LEGEND[thematicMap2].method) {
+							LEGEND[thematicMap2].method = classify_with_bounds;
                             Ext.getCmp('bounds_tf2').showField();
                             Ext.getCmp('numClasses_cb2').hideField();
                         }
@@ -1202,14 +1254,17 @@
         return [colorA, colorB];
     },
     
-    loadById: function(id) {
+    loadFromDatabase: function(id) {
         if (id != proportionalSymbol.parentId || MAPVIEW) {
+            MASK.msg = i18n_loading_geojson;
+            MASK.show();
+
             proportionalSymbol.parentId = id;
             proportionalSymbol.setUrl(path_mapping + 'getGeoJson.action?parentId=' + proportionalSymbol.parentId);
         }
     },
     
-    loadByUrl: function(url) {
+    loadFromFile: function(url) {
         if (url != proportionalSymbol.newUrl) {
             proportionalSymbol.newUrl = url;
 
@@ -1296,7 +1351,7 @@
 		proportionalSymbol.displayMapLegendTypeFields();
         if (proportionalSymbol.validateForm(exception)) {
         
-            MASK.msg = i18n_creating_choropleth;
+            MASK.msg = i18n_aggregating_map_values;
             MASK.show();        
             
             MAPDATA[ACTIVEPANEL].name = Ext.getCmp('map_tf2').getValue();
@@ -1372,7 +1427,7 @@
 		proportionalSymbol.displayMapLegendTypeFields();
         if (proportionalSymbol.validateForm(exception)) {
         
-            MASK.msg = i18n_creating_choropleth;
+            MASK.msg = i18n_aggregating_map_values;
             MASK.show();
             
             Ext.Ajax.request({