← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1805: (GIS) Improved code.

 

------------------------------------------------------------
revno: 1805
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: gis
timestamp: Wed 2010-04-28 13:32:52 +0200
message:
  (GIS) Improved code.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/config.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.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/mapping/script/config.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/config.js	2010-04-14 19:04:47 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/config.js	2010-04-28 11:32:52 +0000
@@ -22,7 +22,6 @@
 	thematicMap = 'gisThematicMap';
 	mapRegistration = 'gisMap';
 	organisationUnitAssignment = 'gisMapOrganisationUnitRelation';
-	overlayRegistration = 'gisOverlay';
 	administration = 'gisAdministration';
 	favorites = 'gisFavoriteMapView';
 	legendSets = 'gisLegendSet';

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2010-04-27 05:35:16 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2010-04-28 11:32:52 +0000
@@ -3874,8 +3874,7 @@
         method: 'POST',
         params: params,
         success: function(r) {
-			var layers = MAP.getLayersByName('Thematic map');
-			var features = layers[0].features;
+			var features = MAP.getLayersByName('Thematic map')[0].features;
 			var mapvalues = Ext.util.JSON.decode(r.responseText).mapvalues;
 			EXPORTVALUES = getExportDataValueJSON( mapvalues );
 			var mv = new Array();
@@ -3908,10 +3907,7 @@
 				}
 			}
 
-			choropleth.indicator = 'value';
-			choropleth.indicatorText = 'Indicator';
-			options.indicator = choropleth.indicator;
-
+			choropleth.indicator = options.indicator = 'value';
 			options.method = Ext.getCmp('method').getValue();
 			options.numClasses = Ext.getCmp('numClasses').getValue();
 			options.colors = choropleth.getColors();
@@ -3934,10 +3930,8 @@
 	MASK.show();
 	
     var mlp = MAPDATA.mapLayerPath;
-    
 	var relations =	 Ext.getCmp('grid_gp').getStore();
-	var layers = MAP.getLayersByName('Thematic map');
-	features = layers[0]['features'];
+	var features = MAP.getLayersByName('Thematic map')[0].features;
 	var nameColumn = MAPDATA.nameColumn;
 	var noCls = 1;
 	var noAssigned = 0;
@@ -3959,10 +3953,7 @@
 	var color = noCls > 1 && noAssigned == features.length ? assigned_row_color : unassigned_row_color;
 	noCls = noCls > 1 && noAssigned == features.length ? 1 : noCls;
 	
-	mapping.indicator = 'value';
-	mapping.indicatorText = 'Indicator';
-	options.indicator = mapping.indicator;
-	
+	mapping.indicator = options.indicator = 'value';
 	options.method = 1;
 	options.numClasses = noCls;