dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10190
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2803: Improved code.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2803 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-02-02 17:48:34 +0100
message:
Improved code.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetGeoJsonAction.java
--
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/java/org/hisp/dhis/mapping/action/GetGeoJsonAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetGeoJsonAction.java 2011-02-02 13:36:42 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetGeoJsonAction.java 2011-02-02 16:45:37 +0000
@@ -105,20 +105,18 @@
object = organisationUnitService.getOrganisationUnitsAtLevel( level, parent );
+ FilterUtils.filter( object, new OrganisationUnitWithCoordinatesFilter() );
+
for ( OrganisationUnit organisationUnit : object )
{
- if ( organisationUnit.getFeatureType() != null )
+ if ( organisationUnit.getFeatureType() != null
+ && organisationUnit.getFeatureType().equals( OrganisationUnit.FEATURETYPE_POINT ) )
{
- if ( organisationUnit.getFeatureType().equals( OrganisationUnit.FEATURETYPE_POINT ) )
- {
- organisationUnit.setType( organisationUnit.getGroupNameInGroupSet( organisationUnitGroupService
- .getOrganisationUnitGroupSetByName( OrganisationUnitGroupSetPopulator.NAME_TYPE ) ) );
- }
+ organisationUnit.setType( organisationUnit.getGroupNameInGroupSet( organisationUnitGroupService
+ .getOrganisationUnitGroupSetByName( OrganisationUnitGroupSetPopulator.NAME_TYPE ) ) );
}
}
- FilterUtils.filter( object, new OrganisationUnitWithCoordinatesFilter() );
-
return object.size() > 0 ? object.iterator().next().getFeatureType() : NONE;
}
}