=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapgeneration/MapGenerationService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapgeneration/MapGenerationService.java 2013-08-23 15:56:19 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/mapgeneration/MapGenerationService.java 2013-10-07 10:01:43 +0000 @@ -29,6 +29,7 @@ */ import java.awt.image.BufferedImage; +import java.util.Date; import org.hisp.dhis.mapping.Map; import org.hisp.dhis.mapping.MapView; @@ -68,10 +69,11 @@ /** * Generate an image that represents this map. * - * @param map the map that will be rendered, + * @param map the map that will be rendered. + * @param date the date for relative periods. * @param width the maximum width of the map image. * @param height the maxium height of the map image. * @return the rendered map image or null if there is no data for the map view. */ - BufferedImage generateMapImage( Map map, Integer width, Integer height ); + BufferedImage generateMapImage( Map map, Date date, Integer width, Integer height ); } === modified file 'dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java' --- dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java 2013-10-07 09:27:49 +0000 +++ dhis-2/dhis-services/dhis-service-mapgeneration/src/main/java/org/hisp/dhis/mapgeneration/GeoToolsMapGenerationService.java 2013-10-07 10:01:43 +0000 @@ -34,6 +34,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Date; import java.util.HashMap; import java.util.List; @@ -96,10 +97,10 @@ public BufferedImage generateMapImage( Map map ) { - return generateMapImage( map, 512, null ); + return generateMapImage( map, new Date(), 512, null ); } - public BufferedImage generateMapImage( Map map, Integer width, Integer height ) + public BufferedImage generateMapImage( Map map, Date date, Integer width, Integer height ) { Assert.isTrue( map != null ); @@ -115,7 +116,7 @@ for ( MapView mapView : mapViews ) { - InternalMapLayer mapLayer = getSingleInternalMapLayer( mapView ); + InternalMapLayer mapLayer = getSingleInternalMapLayer( mapView, date ); if ( mapLayer != null ) { @@ -162,7 +163,7 @@ private static final Integer DEFAULT_RADIUS_HIGH = 35; private static final Integer DEFAULT_RADIUS_LOW = 15; - private InternalMapLayer getSingleInternalMapLayer( MapView mapView ) + private InternalMapLayer getSingleInternalMapLayer( MapView mapView, Date date ) { if ( mapView == null ) { @@ -184,7 +185,9 @@ inGroups.addAll( organisationUnitService.getOrganisationUnits( mapView.getItemOrganisationUnitGroups(), mapView.getOrganisationUnits() ) ); } - mapView.init( null, null, null, atLevels, inGroups, null ); + date = date != null ? date : new Date(); + + mapView.init( null, date, null, atLevels, inGroups, null ); List organisationUnits = mapView.getAllOrganisationUnits(); === modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapController.java' --- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapController.java 2013-09-24 09:43:55 +0000 +++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/mapping/MapController.java 2013-10-07 10:01:43 +0000 @@ -30,6 +30,7 @@ import java.awt.image.BufferedImage; import java.io.InputStream; +import java.util.Date; import java.util.Iterator; import javax.imageio.ImageIO; @@ -58,6 +59,7 @@ import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.user.UserService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; @@ -226,13 +228,14 @@ @RequestMapping(value = { "/{uid}/data", "/{uid}/data.png" }, method = RequestMethod.GET) public void getMapData( @PathVariable String uid, + @RequestParam( value = "date", required = false ) @DateTimeFormat( pattern = "yyyy-MM-dd" ) Date date, @RequestParam( required = false ) Integer width, @RequestParam( required = false ) Integer height, HttpServletResponse response ) throws Exception { Map map = mappingService.getMap( uid ); - renderMapViewPng( map, width, height, response ); + renderMapViewPng( map, date, width, height, response ); } //-------------------------------------------------------------------------- @@ -266,10 +269,10 @@ } } - private void renderMapViewPng( Map map, Integer width, Integer height, HttpServletResponse response ) + private void renderMapViewPng( Map map, Date date, Integer width, Integer height, HttpServletResponse response ) throws Exception { - BufferedImage image = mapGenerationService.generateMapImage( map, width, height ); + BufferedImage image = mapGenerationService.generateMapImage( map, date, width, height ); if ( image != null ) { === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-10-07 09:54:00 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-10-07 10:01:43 +0000 @@ -698,7 +698,6 @@ both = Both column = Column row = Row -<<<<<<< TREE show = Show the_following_persons_found_in = The following persons found in for_infor = for === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2013-09-17 17:15:10 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2013-10-07 10:01:43 +0000 @@ -33,7 +33,7 @@ #if( $ip.chartInterpretation ) #elseif( $ip.mapInterpretation )