Class MapReport

java.lang.Object
ca.spatial.reportwriter.Report
ca.spatial.reportwriter.MapReport
All Implemented Interfaces:
Selectable<Report>, Comparable<Report>

public class MapReport extends Report
Create a map based on the contents of a LayerList object. First create a LayerList object (or clone one from an existing MapViewer, and then use it to instantiate this class.

Parameters:

This report supports zooming in to a specified zone, using the 'mapextent' parameter. The mapexent is specified in map coordinates, using the bottom left corner of the extent and the width and height. For example

  http://localhost/current/map.html?mapextent=400000,300000,10000,15000
 
will specify that the report should zoom in to an that has a lower left corner of 400000 east and 300000 north with a width of 10000 and a height of 15000. The units are typically in metres.

The mapextent parameter can also be assigned to the report using the Report.setDefaultParams(java.lang.String[][]) method. For example,

   MapReport mr = new MapReport(...);
   mr.addDefaultParam("mapextent","400000,300000,10000,15000");
   reportWriter.addReport(mr);
 
  • Field Details

    • TYPES

      public String[] TYPES
  • Constructor Details

    • MapReport

      public MapReport(String filename, String title, LayerList ll, int period, int width, int height, int captionX, int captionY)
    • MapReport

      public MapReport(String filename, String title, LayerList ll, int period, int width, int height, int captionX, int captionY, boolean showLegend)
    • MapReport

      public MapReport(String filename, String title, LayerList ll, int period, int width, int height, int captionX, int captionY, boolean showLegend, String htmlText)
  • Method Details

    • getFullFilename

      public String getFullFilename()
    • getPeriod

      public int getPeriod()
    • setPeriod

      public void setPeriod(int period)
    • getCaptionX

      public int getCaptionX()
    • setCaptionX

      public void setCaptionX(int x)
    • getCaptionY

      public int getCaptionY()
    • setCaptionY

      public void setCaptionY(int y)
    • getLayerList

      public LayerList getLayerList()
    • setLayerList

      public void setLayerList(LayerList list)
    • getWidth

      public int getWidth()
    • setWidth

      public void setWidth(int w)
    • getHeight

      public int getHeight()
    • setHeight

      public void setHeight(int h)
    • setShowLegend

      public void setShowLegend(boolean show)
    • getShowLegend

      public boolean getShowLegend()
    • setHtmlText

      public void setHtmlText(String htmlText)
    • getHtmlText

      public String getHtmlText()
    • doReport

      public ca.spatial.reportwriter.Report.DataCache doReport(String name, PrintStream out, Map<String,​Object> param, ca.spatial.reportwriter.Report.DataCache cache)
      Description copied from class: Report
      The method used by the report writer to format the requested report. This method is implemented in every custom report. Application programs generally do not need to call this method, but instead use the report writer methods to obtain reports.
      Specified by:
      doReport in class Report
      Parameters:
      name - The full name of the report to be printed, including the extension of the sub-report (if any).
      out - The output stream to print output on to.
      param - A HashMap containing parameters that modify the report (for example the scenario name).
    • getTypes

      public String[] getTypes()
      Description copied from class: Report
      An accessor function to retrieve the list of report types supported by this report. See the documentation for the TYPES variable for the list of sub-types.
      Specified by:
      getTypes in class Report