← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 303: Method 'distributes values' added to thematic map.

 

------------------------------------------------------------
revno: 303
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Tue 2009-05-19 15:57:43 +0200
message:
  Method 'distributes values' added to thematic map.
modified:
  gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js
  gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/core/GeoStat.js
  gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js

=== modified file 'gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js'
--- gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js	2009-05-19 13:24:46 +0000
+++ gis/dhis-web-mapping/src/main/webapp/demos/geostat/geostat.js	2009-05-19 13:57:43 +0000
@@ -58,8 +58,12 @@
 
     var selectFeatureChoropleth = new OpenLayers.Control.newSelectFeature(
         choroplethLayer,
-        {onClickSelect: onClickSelectChoropleth, onClickUnselect: onClickUnselectChoropleth,
-        onHoverSelect: onHoverSelectChoropleth, onHoverUnselect: onHoverUnselectChoropleth}
+        {
+            onClickSelect: onClickSelectChoropleth,
+            onClickUnselect: onClickUnselectChoropleth,
+            onHoverSelect: onHoverSelectChoropleth,
+            onHoverUnselect: onHoverUnselectChoropleth
+        }
     );
 
     var selectFeaturePoint = new OpenLayers.Control.newSelectFeature( propSymbolLayer,
@@ -1354,7 +1358,7 @@
             choropleth.indicatorText = 'Indicator';
             options.indicator = choropleth.indicator;
             
-            options.method = 1;
+            options.method = Ext.getCmp('method').getValue();
             options.numClasses = Ext.getCmp('numClasses').getValue();
             options.colors = choropleth.getColors();
             

=== modified file 'gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/core/GeoStat.js'
--- gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/core/GeoStat.js	2009-05-19 13:24:46 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/core/GeoStat.js	2009-05-19 13:57:43 +0000
@@ -363,7 +363,7 @@
      *   nBins - {Integer} Total number of bins
      */
     defaultLabelGenerator: function(bin, binIndex, nbBins) {
-        return bin.lowerBound.toFixed(1) + ' - ' + bin.upperBound.toFixed(1) + ' (' + bin.nbVal + ')'
+        return bin.lowerBound.toFixed(1) + ' - ' + bin.upperBound.toFixed(1) + '   ( ' + bin.nbVal + ' )'
     },
 
     classifyWithBounds: function(bounds) {

=== 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-05-15 11:55:18 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mfbase/mapfish/widgets/geostat/Choropleth.js	2009-05-19 13:57:43 +0000
@@ -338,6 +338,24 @@
         
         {
             xtype: 'combo',
+            fieldLabel: 'Method',
+            id: 'method',
+            editable: false,
+            valueField: 'value',
+            displayField: 'text',
+            mode: 'local',
+            emptyText: 'Required',
+            value: 2,
+            triggerAction: 'all',
+            width: combo_width,
+            store: new Ext.data.SimpleStore({
+                fields: ['value', 'text'],
+                data: [[2, 'Distributed values'], [1, 'Equal intervals']]
+            })
+        },   
+        
+        {
+            xtype: 'combo',
             fieldLabel: 'Classes',
             id: 'numClasses',
             editable: false,
@@ -351,8 +369,8 @@
                 fields: ['value'],
                 data: [[1], [2], [3], [4], [5], [6], [7], [8]]
             })
-        },        
-            
+        },
+        
         {
             xtype: 'combo',
             id: 'maplegend_cb',



--
Trunk
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.