dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15027
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5262: (GIS) Performance improvements completed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5262 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-12-01 18:41:12 +0100
message:
(GIS) Performance improvements completed.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js
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/Centroid.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js 2011-12-01 15:49:20 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js 2011-12-01 17:31:30 +0000
@@ -1099,16 +1099,21 @@
G.vars.mask.hide();
return;
}
-
- for (var i = 0; i < mapvalues.length; i++) {
- for (var j = 0; j < this.layer.features.length; j++) {
- if (mapvalues[i].oi == this.layer.features[j].attributes.id) {
+
+ for (var j = 0; j < this.layer.features.length; j++) {
+ for (var i = 0; i < mapvalues.length; i++) {
+ if (this.layer.features[j].attributes.id == mapvalues[i].oi) {
this.layer.features[j].attributes.value = parseFloat(mapvalues[i].v);
this.layer.features[j].attributes.labelString = this.layer.features[j].attributes.name + ' (' + this.layer.features[j].attributes.value + ')';
- this.layer.features[j].attributes.name = G.util.cutString(this.layer.features[j].attributes.name, 30);
+ this.layer.features[j].attributes.fixedName = G.util.cutString(this.layer.features[j].attributes.name, 30);
break;
}
}
+ if (!this.layer.features[j].attributes.value) {
+ this.layer.features[j].attributes.value = 0;
+ this.layer.features[j].attributes.labelString = this.layer.features[j].attributes.name + ' (0)';
+ this.layer.features[j].attributes.fixedName = G.util.cutString(this.layer.features[j].attributes.name, 30);
+ }
}
this.updateValues = false;
=== 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-12-01 15:49:20 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2011-12-01 17:31:30 +0000
@@ -1694,16 +1694,21 @@
G.vars.mask.hide();
return;
}
-
- for (var i = 0; i < mapvalues.length; i++) {
- for (var j = 0; j < this.layer.features.length; j++) {
- if (mapvalues[i].oi == this.layer.features[j].attributes.id) {
+
+ for (var j = 0; j < this.layer.features.length; j++) {
+ for (var i = 0; i < mapvalues.length; i++) {
+ if (this.layer.features[j].attributes.id == mapvalues[i].oi) {
this.layer.features[j].attributes.value = parseFloat(mapvalues[i].v);
this.layer.features[j].attributes.labelString = this.layer.features[j].attributes.name + ' (' + this.layer.features[j].attributes.value + ')';
this.layer.features[j].attributes.fixedName = G.util.cutString(this.layer.features[j].attributes.name, 30);
break;
}
}
+ if (!this.layer.features[j].attributes.value) {
+ this.layer.features[j].attributes.value = 0;
+ this.layer.features[j].attributes.labelString = this.layer.features[j].attributes.name + ' (0)';
+ this.layer.features[j].attributes.fixedName = G.util.cutString(this.layer.features[j].attributes.name, 30);
+ }
}
this.updateValues = false;
=== 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-12-01 15:49:20 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2011-12-01 17:31:30 +0000
@@ -1694,16 +1694,21 @@
G.vars.mask.hide();
return;
}
-
- for (var i = 0; i < mapvalues.length; i++) {
- for (var j = 0; j < this.layer.features.length; j++) {
- if (mapvalues[i].oi == this.layer.features[j].attributes.id) {
+
+ for (var j = 0; j < this.layer.features.length; j++) {
+ for (var i = 0; i < mapvalues.length; i++) {
+ if (this.layer.features[j].attributes.id == mapvalues[i].oi) {
this.layer.features[j].attributes.value = parseFloat(mapvalues[i].v);
this.layer.features[j].attributes.labelString = this.layer.features[j].attributes.name + ' (' + this.layer.features[j].attributes.value + ')';
this.layer.features[j].attributes.fixedName = G.util.cutString(this.layer.features[j].attributes.name, 30);
break;
}
}
+ if (!this.layer.features[j].attributes.value) {
+ this.layer.features[j].attributes.value = 0;
+ this.layer.features[j].attributes.labelString = this.layer.features[j].attributes.name + ' (0)';
+ this.layer.features[j].attributes.fixedName = G.util.cutString(this.layer.features[j].attributes.name, 30);
+ }
}
this.updateValues = false;