dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33614
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17188: minor fix
------------------------------------------------------------
revno: 17188
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-10-21 15:21:34 +0700
message:
minor fix
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.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-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java 2014-10-21 07:58:09 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java 2014-10-21 08:21:34 +0000
@@ -32,7 +32,6 @@
import com.fasterxml.jackson.core.JsonGenerator;
import com.google.common.collect.Lists;
import org.hisp.dhis.common.Pager;
-import org.hisp.dhis.organisationunit.CoordinatesTuple;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.organisationunit.comparator.OrganisationUnitByLevelComparator;
@@ -251,7 +250,7 @@
organisationUnits = new ArrayList<>( organisationUnitService.getOrganisationUnitsAtLevel( rpLevel ) );
}
- response.setContentType( "application/json+geojson" );
+ response.setContentType( "application/json" );
JsonFactory jsonFactory = new JsonFactory();
JsonGenerator generator = jsonFactory.createGenerator( response.getOutputStream() );
@@ -283,7 +282,7 @@
// if featureType is anything other than Point (MultiPoint), just assume MultiPolygon
if ( !OrganisationUnit.FEATURETYPE_POINT.equals( featureType ) )
{
- featureType = OrganisationUnit.FEATURETYPE_MULTIPOLYGON;
+ featureType = OrganisationUnit.FEATURETYPE_POLYGON;
}
else
{
@@ -299,6 +298,7 @@
generator.writeStringField( "type", featureType );
generator.writeArrayFieldStart( "coordinates" );
+
generator.writeRawValue( organisationUnit.getCoordinates() );
generator.writeEndArray();