=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2014-10-01 11:05:44 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2014-10-21 07:43:54 +0000 @@ -78,6 +78,7 @@ public static final String FEATURETYPE_MULTIPOLYGON = "MultiPolygon"; public static final String FEATURETYPE_POLYGON = "Polygon"; public static final String FEATURETYPE_POINT = "Point"; + public static final String FEATURETYPE_MULTIPOINT = "MultiPoint"; public static final String RESULTTYPE_SYMBOL = "Symbol"; public static final String KEY_USER_ORGUNIT = "USER_ORGUNIT"; === 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 06:26:27 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/organisationunit/OrganisationUnitController.java 2014-10-21 07:43:54 +0000 @@ -32,6 +32,7 @@ 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; @@ -234,20 +235,20 @@ @RequestMapping( value = "", method = RequestMethod.GET, produces = { "application/json+geo", "application/json+geojson" } ) public void getGeoJson( - @RequestParam( value = "level", defaultValue = "1" ) int pvLevel, - @RequestParam( value = "parent", required = false ) String pvParent, + @RequestParam( value = "level", defaultValue = "1" ) int rpLevel, + @RequestParam( value = "parent", required = false ) String rpParent, HttpServletResponse response ) throws IOException { - OrganisationUnit parent = manager.search( OrganisationUnit.class, pvParent ); + OrganisationUnit parent = manager.search( OrganisationUnit.class, rpParent ); List organisationUnits; if ( parent != null ) { - organisationUnits = new ArrayList<>( organisationUnitService.getOrganisationUnitsAtLevel( pvLevel, parent ) ); + organisationUnits = new ArrayList<>( organisationUnitService.getOrganisationUnitsAtLevel( rpLevel, parent ) ); } else { - organisationUnits = new ArrayList<>( organisationUnitService.getOrganisationUnitsAtLevel( pvLevel ) ); + organisationUnits = new ArrayList<>( organisationUnitService.getOrganisationUnitsAtLevel( rpLevel ) ); } JsonFactory jsonFactory = new JsonFactory(); @@ -277,10 +278,15 @@ String featureType = organisationUnit.getFeatureType(); - if ( OrganisationUnit.FEATURETYPE_POLYGON.equals( featureType ) ) + // if featureType is anything other than Point (MultiPoint), just assume MultiPolygon + if ( !OrganisationUnit.FEATURETYPE_POINT.equals( featureType ) ) { featureType = OrganisationUnit.FEATURETYPE_MULTIPOLYGON; } + else + { + featureType = OrganisationUnit.FEATURETYPE_MULTIPOINT; + } generator.writeStartObject();