dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31915
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16304: GIS array sorting bug fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16304 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-08-04 12:48:07 +0200
message:
GIS array sorting bug fixed.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.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/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-07-15 21:30:42 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-08-04 10:42:25 +0000
@@ -2588,15 +2588,16 @@
util.geojson = {};
util.geojson.decode = function(doc, levelOrder) {
- var geojson = {};
- geojson.type = 'FeatureCollection';
- geojson.crs = {
- type: 'EPSG',
- properties: {
- code: '4326'
- }
+ var geojson = {
+ type: 'FeatureCollection',
+ crs: {
+ type: 'EPSG',
+ properties: {
+ code: '4326'
+ }
+ },
+ features: []
};
- geojson.features = [];
levelOrder = levelOrder || 'ASC';
@@ -2657,7 +2658,7 @@
// accepts [number], [string], [{prop: number}], [{prop: string}]
if (!util.object.getLength(array)) {
- return;
+ return array;
}
key = key || 'name';