← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5023: (GIS) Bug fixed: Legend set box not loaded during mapview launch.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5023 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-10-24 15:37:35 +0200
message:
  (GIS) Bug fixed: Legend set box not loaded during mapview launch.
modified:
  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/Point.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/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-24 11:14:16 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2011-10-24 13:35:32 +0000
@@ -1478,11 +1478,11 @@
             this.setMapViewMap();
         }
         else if (this.legend.value == G.conf.map_legendset_type_predefined) {
-            if (G.stores.predefinedMapLegendSet.isLoaded) {
+            if (G.stores.predefinedColorMapLegendSet.isLoaded) {
                 predefinedMapLegendSetStoreCallback.call(this);
             }
             else {
-                G.stores.predefinedMapLegendSet.load({scope: this, callback: function() {
+                G.stores.predefinedColorMapLegendSet.load({scope: this, callback: function() {
                     predefinedMapLegendSetStoreCallback.call(this);
                 }});
             }

=== 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-24 11:14:16 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js	2011-10-24 13:35:32 +0000
@@ -1456,11 +1456,11 @@
             this.setMapViewMap();
         }
         else if (this.legend.value == G.conf.map_legendset_type_predefined) {
-            if (G.stores.predefinedMapLegendSet.isLoaded) {
+            if (G.stores.predefinedColorMapLegendSet.isLoaded) {
                 predefinedMapLegendSetStoreCallback.call(this);
             }
             else {
-                G.stores.predefinedMapLegendSet.load({scope: this, callback: function() {
+                G.stores.predefinedColorMapLegendSet.load({scope: this, callback: function() {
                     predefinedMapLegendSetStoreCallback.call(this);
                 }});
             }
@@ -1503,19 +1503,19 @@
 					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();