=== 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 , '' + msrw + ' '+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(); + } } },