dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08927
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2255: (GIS) Minor fixes.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2255 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2010-12-02 10:43:27 +0100
message:
(GIS) Minor fixes.
modified:
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/GetOrganisationUnitLevelsByFeatureTypeAction.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 2010-11-25 14:51:44 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetGeoJsonAction.java 2010-12-02 09:41:40 +0000
@@ -93,6 +93,11 @@
{
OrganisationUnit parent = organisationUnitService.getOrganisationUnit( parentId );
+ if ( level == null )
+ {
+ level = organisationUnitService.getLevelOfOrganisationUnit( parent );
+ }
+
object = organisationUnitService.getOrganisationUnitsAtLevel( level, parent );
FilterUtils.filter( object, new OrganisationUnitWithCoordinatesFilter() );
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitLevelsByFeatureTypeAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitLevelsByFeatureTypeAction.java 2010-12-01 12:19:19 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/GetOrganisationUnitLevelsByFeatureTypeAction.java 2010-12-02 09:39:08 +0000
@@ -27,6 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import java.util.Arrays;
import java.util.List;
import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -91,10 +92,7 @@
else if ( featureType.equals( OrganisationUnit.FEATURETYPE_POINT ) )
{
- while ( object.size() > 1 )
- {
- object.remove( 0 );
- }
+ object = Arrays.asList( object.get( object.size() - 1 ) );
}
return SUCCESS;