=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Centroid.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Centroid.js 2011-10-10 15:08:48 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Centroid.js 2011-10-24 11:14:16 +0000
@@ -158,7 +158,7 @@
element = document.createElement("div");
element.style.lineHeight = this.widget.legendNames[i] ? "12px" : "7px";
- element.innerHTML = '' + this.widget.legendNames[i] + '
' + this.classification.bins[i].label;
+ element.innerHTML = '' + (this.widget.legendNames[i] || '') + '
' + this.classification.bins[i].label;
this.legendDiv.appendChild(element);
element = document.createElement("div");
=== 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 2011-10-10 15:08:48 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Choropleth.js 2011-10-24 11:14:16 +0000
@@ -176,7 +176,7 @@
this.legendDiv.appendChild(element);
}
}
- else if (G.vars.activeWidget.legend.value == G.conf.map_legendset_type_predefined) {
+ else if (G.vars.activeWidget.legend.value == G.conf.map_legendset_type_predefined) {
for (var i = 0; i < this.classification.bins.length; i++) {
var element = document.createElement("div");
element.style.backgroundColor = this.colorInterpolation[i].toHexString();
@@ -188,7 +188,7 @@
element = document.createElement("div");
element.style.lineHeight = this.widget.legendNames[i] ? "12px" : "7px";
- element.innerHTML = '' + this.widget.legendNames[i] + '
' + this.classification.bins[i].label;
+ element.innerHTML = '' + (this.widget.legendNames[i] || '') + '
' + this.classification.bins[i].label;
this.legendDiv.appendChild(element);
element = document.createElement("div");
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Point.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Point.js 2011-10-10 15:08:48 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat/Point.js 2011-10-24 11:14:16 +0000
@@ -188,7 +188,7 @@
element = document.createElement("div");
element.style.lineHeight = this.widget.legendNames[i] ? "12px" : "7px";
- element.innerHTML = '' + this.widget.legendNames[i] + '
' + this.classification.bins[i].label;
+ element.innerHTML = '' + (this.widget.legendNames[i] || '') + '
' + this.classification.bins[i].label;
this.legendDiv.appendChild(element);
element = document.createElement("div");
=== 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 2011-10-10 14:37:12 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2011-10-24 11:14:16 +0000
@@ -1517,27 +1517,27 @@
params: {mapLegendSetId: mls},
scope: this,
success: function(r) {
- var mapLegends = Ext.util.JSON.decode(r.responseText).mapLegends;
- var colors = [];
- var bounds = [];
- var legendNames = [];
+ var mapLegends = Ext.util.JSON.decode(r.responseText).mapLegends,
+ colors = [],
+ bounds = [],
+ names = [];
for (var i = 0; i < mapLegends.length; i++) {
if (bounds[bounds.length-1] != mapLegends[i].startValue) {
if (bounds.length !== 0) {
colors.push(new mapfish.ColorRgb(240,240,240));
- legendNames.push('');
+ names.push('');
}
bounds.push(mapLegends[i].startValue);
}
colors.push(new mapfish.ColorRgb());
colors[colors.length-1].setFromHex(mapLegends[i].color);
- legendNames.push(mapLegends[i].name);
+ names.push(mapLegends[i].name);
bounds.push(mapLegends[i].endValue);
- }
+ }
this.colorInterpolation = colors;
this.bounds = bounds;
- this.legendNames = legendNames;
+ this.legendNames = names;
if (isMapView) {
this.setMapViewMap();
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2011-10-10 15:08:48 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2011-10-24 11:14:16 +0000
@@ -1495,10 +1495,10 @@
params: {mapLegendSetId: mls},
scope: this,
success: function(r) {
- var mapLegends = Ext.util.JSON.decode(r.responseText).mapLegends;
- var colors = [];
- var bounds = [];
- var legendNames = [];
+ var mapLegends = Ext.util.JSON.decode(r.responseText).mapLegends,
+ colors = [],
+ bounds = [],
+ names = [];
for (var i = 0; i < mapLegends.length; i++) {
if (bounds[bounds.length-1] != mapLegends[i].startValue) {
if (bounds.length !== 0) {