Package ca.spatial.reportwriter
Class MapReport
java.lang.Object
ca.spatial.reportwriter.Report
ca.spatial.reportwriter.MapReport
- All Implemented Interfaces:
Selectable<Report>
,Comparable<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,15000will 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);
-
Nested Class Summary
Nested classes/interfaces inherited from class ca.spatial.reportwriter.Report
Report.GetNodesAt
-
Field Summary
FieldsFields inherited from class ca.spatial.reportwriter.Report
AREA, LINE, PIE, SIDE_BY_SIDE_BARS, STACKED_BARS
-
Constructor Summary
ConstructorsConstructorDescriptionMapReport(String filename, String title, LayerList ll, int period, int width, int height, int captionX, int captionY)
MapReport(String filename, String title, LayerList ll, int period, int width, int height, int captionX, int captionY, boolean showLegend)
MapReport(String filename, String title, LayerList ll, int period, int width, int height, int captionX, int captionY, boolean showLegend, String htmlText)
-
Method Summary
Modifier and TypeMethodDescriptionca.spatial.reportwriter.Report.DataCache
doReport(String name, PrintStream out, Map<String,Object> param, ca.spatial.reportwriter.Report.DataCache cache)
The method used by the report writer to format the requested report.int
int
int
int
boolean
String[]
getTypes()
An accessor function to retrieve the list of report types supported by this report.int
getWidth()
void
setCaptionX(int x)
void
setCaptionY(int y)
void
setHeight(int h)
void
setHtmlText(String htmlText)
void
setLayerList(LayerList list)
void
setPeriod(int period)
void
setShowLegend(boolean show)
void
setWidth(int w)
Methods inherited from class ca.spatial.reportwriter.Report
addDefaultParam, chartImg, compareTo, csvLink, doesAnyTypes, doesCSV, doesGIF, doesHTML, doesPNG, doesType, encodeFileURL, encodeURL, endMainContent, escapeRegexChars, footer, formatColumnHeadings, formatColumnHeadings, getAdditionalFiles, getAttributeStore, getBasepart, getBasepart, getDefaultFilename, getDisplayFormat, getExtension, getExtension, getFilename, getFolderpart, getFolderpart, getLength, getNamepart, getNamepart, getPathToRoot, getReportFor, getTitle, header, htmlText, indexLink, interpolateParams, isDhandler, isIndexed, isSelected, parentIndex, patternToRegex, setAttributeStore, setDefaultParams, setDisplayFormat, setIndexed, setSelected, setTitle, toString, uniqueLabels
-
Field Details
-
TYPES
-
-
Constructor Details
-
MapReport
-
MapReport
-
MapReport
-
-
Method Details
-
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
-
setLayerList
-
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
-
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. -
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.
-