← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2020: (GIS) Div bugs fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2020 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: trunk
timestamp: Sun 2010-06-20 12:13:41 +0200
message:
  (GIS) Div bugs fixed.
modified:
  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/resources/mapfish/core/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 '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-06-19 14:01:32 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2010-06-19 21:30:53 +0000
@@ -2656,13 +2656,13 @@
 										Ext.messageRed.msg( i18n_map_source , '<span class="x-msg-hl">' + msrw + '</span> '+i18n_is_already_selected+'.');
 									}
 									else {
+                                        MAPSOURCE = msv;
+                                        
 										Ext.Ajax.request({
 											url: path + 'setMapSourceTypeUserSetting' + type,
 											method: 'POST',
 											params: { mapSourceType: msv },
 											success: function(r) {
-												MAPSOURCE = msv;
-												
 												Ext.getCmp('map_cb').getStore().reload();
 												Ext.getCmp('maps_cb').getStore().reload();
 												Ext.getCmp('mapview_cb').getStore().reload();
@@ -2711,12 +2711,12 @@
 										});
 										
 										if (MAPSOURCE == map_source_type_geojson) {
-											mapLayerMapSourceFileComboBox.showField();
-											mapLayerPathWMSOverlayTextField.hideField();
+											mapLayerMapSourceFileComboBox.show();
+											mapLayerPathWMSOverlayTextField.hide();
 										}
 										else if (MAPSOURCE == map_source_type_shapefile) {
-											mapLayerMapSourceFileComboBox.hideField();
-											mapLayerPathWMSOverlayTextField.showField();
+											mapLayerMapSourceFileComboBox.hide();
+											mapLayerPathWMSOverlayTextField.show();
 										}
 									}
 								}
@@ -4267,7 +4267,7 @@
     if (LABELS[organisationUnitAssignment]) {
         toggleFeatureLabelsAssignment(false, l);
     }
-    FEATURE[organisationUnitAssignment] = l.features;
+    FEATURE[thematicMap] = l.features;
 	
     var mlp = MAPDATA[organisationUnitAssignment].mapLayerPath;
 	var relations =	 Ext.getCmp('grid_gp').getStore();

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js	2010-06-10 14:06:12 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js	2010-06-19 22:00:10 +0000
@@ -113,15 +113,15 @@
 		
 		if (mapLegendType == map_legend_type_automatic) {
 			this.colorInterpolation = mapfish.ColorRgb.getColorsArrayByRgbInterpolation(initialColors[0], initialColors[1], numColors);
-			for (var i = 0; i < choropleth.imageLegend.length; i++) {
-				choropleth.imageLegend[i].color = this.colorInterpolation[i].toHexString();
-			}
+            for (var i = 0; i < choropleth.imageLegend.length && i < this.colorInterpolation.length; i++) {
+                choropleth.imageLegend[i].color = this.colorInterpolation[i].toHexString();
+            }
 		}
 		else if (mapLegendType == map_legend_type_predefined) {
 			this.colorInterpolation = choropleth.colorInterpolation;
-			for (var i = 0; i < choropleth.colorInterpolation.length; i++) {
-				choropleth.imageLegend[i].color = choropleth.colorInterpolation[i].toHexString();
-			}
+            for (var i = 0; i < choropleth.colorInterpolation.length && i < choropleth.colorInterpolation.length; i++) {
+                choropleth.imageLegend[i].color = choropleth.colorInterpolation[i].toHexString();
+            }
 		}
     },