← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1897: (GIS) Self-defined legend breaks bug fixed + map rendering with data element values bug fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 1897 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-08-04 00:23:08 +0200
message:
  (GIS) Self-defined legend breaks bug fixed + map rendering with data element values bug fixed.
modified:
  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-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-07-14 01:27:58 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js	2010-08-03 18:42:13 +0000
@@ -500,7 +500,7 @@
             mlt = Ext.getCmp('maplegendtype_cb').getValue();
         }
         else if (ACTIVEPANEL == thematicMap2) {
-            Ext.getCmp('maplegendtype_cb2').getValue();
+            mlt = Ext.getCmp('maplegendtype_cb2').getValue();
         }
         else if (ACTIVEPANEL == organisationUnitAssignment) {
             mlt = map_legend_type_automatic;
@@ -508,7 +508,7 @@
 
 		if (mlt == map_legend_type_automatic) {
 			if (method == mapfish.GeoStat.Distribution.CLASSIFY_WITH_BOUNDS) {
-				var str = ACTIVEPANEL == thematicMap ? Ext.getCmp('bounds').getValue() : Ext.getCmp('bounds_cb2').getValue();
+				var str = ACTIVEPANEL == thematicMap ? Ext.getCmp('bounds_tf').getValue() : Ext.getCmp('bounds_tf2').getValue();
 				
 				for (var i = 0; i < str.length; i++) {
 					str = str.replace(' ','');
@@ -531,10 +531,10 @@
 				var newInput = bounds.join(',');
                 
                 if (ACTIVEPANEL == thematicMap) {
-                    Ext.getCmp('bounds').setValue(newInput);
+                    Ext.getCmp('bounds_tf').setValue(newInput);
                 }
                 else {
-                    Ext.getCmp('bounds_cb2').setValue(newInput);
+                    Ext.getCmp('bounds_tf2').setValue(newInput);
                 }
 				
 				for (var i = 0; i < bounds.length; i++)

=== 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-03 17:21:49 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2010-08-03 22:04:02 +0000
@@ -246,7 +246,6 @@
             sortInfo: { field: 'name', direction: 'ASC' },
             autoLoad: true
         });
-    
         
         indicatorStore = new Ext.data.JsonStore({
             url: path_mapping + 'getIndicatorsByIndicatorGroup' + type,
@@ -328,7 +327,6 @@
             
         periodStore = new Ext.data.JsonStore({
             url: path_mapping + 'getPeriodsByPeriodType' + type,
-            baseParams: { name: 0 },
             root: 'periods',
             fields: ['id', 'name'],
             autoLoad: false,
@@ -345,7 +343,6 @@
 								success: function(r) {
                                     Ext.getCmp('map_cb').getStore().load();
                                     Ext.getCmp('maps_cb').getStore().load();
-                                    
                                     Ext.getCmp('mapsource_cb').setValue(MAPSOURCE);
                                 },
                                 failure: function() {
@@ -551,6 +548,8 @@
 							Ext.getCmp('dataelement_cb').showField();
 							VALUETYPE.polygon = map_value_type_dataelement;
 						}
+                        
+                        choropleth.classify(false, true);
 					}
 				}
 			}
@@ -1234,7 +1233,7 @@
             }
         }
         else if (Ext.getCmp('mapvaluetype_cb').getValue() == map_value_type_dataelement) {
-            if (!Ext.getCmp('indicator_cb').getValue()) {
+            if (!Ext.getCmp('dataelement_cb').getValue()) {
                 if (exception) {
                     Ext.message.msg(false, i18n_form_is_not_complete);
                 }
@@ -1318,7 +1317,7 @@
             if (LABELS[thematicMap]) {
                 toggleFeatureLabelsPolygons(false, polygonLayer);
             }
-            
+
             var indicatorOrDataElementId = VALUETYPE.polygon == map_value_type_indicator ?
                 Ext.getCmp('indicator_cb').getValue() : Ext.getCmp('dataelement_cb').getValue();
             var dataUrl = VALUETYPE.polygon == map_value_type_indicator ?
@@ -1339,7 +1338,7 @@
                         MASK.hide();
                         return;
                     }
-                    
+
                     for (var i = 0; i < mapvalues.length; i++) {
                         for (var j = 0; j < FEATURE[thematicMap].length; j++) {
                             if (mapvalues[i].orgUnitName == FEATURE[thematicMap][j].attributes.name) {

=== 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-03 17:21:49 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2010-08-03 22:04:02 +0000
@@ -249,7 +249,6 @@
         
         indicatorStore2 = new Ext.data.JsonStore({
             url: path_mapping + 'getIndicatorsByIndicatorGroup' + type,
-			baseParams: {indicatorGroupId:0},
             root: 'indicators',
             fields: ['id', 'name', 'shortName'],
             idProperty: 'id',
@@ -263,7 +262,8 @@
                                 var name = record.get('name');
                                 name = name.replace('&lt;', '<').replace('&gt;', '>');
                                 record.set('name', name);
-                            },  this
+                            },
+                            this
                         );
                         
                         Ext.getCmp('indicator_cb2').clearValue();
@@ -548,6 +548,8 @@
 							Ext.getCmp('dataelement_cb2').showField();
 							VALUETYPE.point = map_value_type_dataelement;
 						}
+                        
+                        proportionalSymbol.classify(false, true);
 					}
 				}
 			}
@@ -1231,7 +1233,7 @@
             }
         }
         else if (Ext.getCmp('mapvaluetype_cb2').getValue() == map_value_type_dataelement) {
-            if (!Ext.getCmp('indicator_cb2').getValue()) {
+            if (!Ext.getCmp('dataelement_cb2').getValue()) {
                 if (exception) {
                     Ext.message.msg(false, i18n_form_is_not_complete);
                 }