B U S I N E S S A N A L Y S T 10.2 R E S T R E P O R T T A S K
Map Report Endpoint
Creates a report which includes map image(s) accompanied with custom user data and graphics.
Availability: Business Analyst Server.
http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/MapReport/execute
Specific Parameters
Maps (required) |
This array specifies maps to be shown in the map report. Type array of Map. The first map in this array is the main map. It is required. Some map reports show more than one map. In this case, the additional maps could be specified within this array. |
MapLegend |
A complex object specifying properties of the map legend to be used in the output report. Properties that can be specified are the legend Title string and the LegendItems array containing Color/Label pairs. |
Data |
Data properties for "Site Details Map" report. Type array of KeyValue pairs. The following keys are available for this report: "City", "State", "ZIP", "County", "CBSA", "Tract", and "BlockGroup". |
Other Parameters
OutputType (required) |
Array of task output options. Options for this method include creating a report (GetReport). Type array of TaskOutputType. |
StandardReportOptions (required) |
Report parameters. Type ReportOptions.
The TemplateName parameter specifies a map report template.
The ReportHeader parameter allows subtitle, locationname,
address, areadesc2, latitude,
longitude, and logo or binarylogo options.
Along with header options, you can set the ReportFooter parameter
which is also an array of KeyValue. It allows
ProductLabel, ProductUrl, PhoneNumber,
TrialUrl, and TrialUrlText options. See examples below. |
ActiveDatasetID (optional) |
ID of the active dataset. Type string. Default: ID of the first available dataset. |
f (optional) |
Response format. Type string. Available formats: HTML, JSON, PJSON, XML. Default: HTML. |
IsFullErrorMessage (optional) |
Mode for composing error messages. Type boolean. Default: false. |
OutputReportItem (optional) |
Configuration options for storing the output report in the repository. This will enable viewing and working with the output result in subsequent tasks. Type esriFolderItem. |
token |
Authentication token. This parameter is required if your Business Analyst Server is secured. Type string. |
Returns
Variable of type TaskResultOutput
Remarks
The Map Report allows Business Analyst Server users to create reports that allow for map images to be returned in the resulting report. The map image is based on a map area and an array of map description objects. Every map description includes a map service URL and a collection of custom graphic elements drawn over the map. Images produced with map descriptions will be combined into the map image using the Opacity value set for every map description object.
This endpoint allows creating a report using one of available map report templates. Some map report templates allow more than one map to be shown in the report. In this case, you could specify additional maps after the main map within the Maps array. The main map is required. Additional maps are optional.
The map report template is selected with the TemplateName parameter of the report options. There are five map report templates that are available now:
Map Report |
This report template supports a main map and a map legend. |
Map Report Landscape |
This report template supports a main map and a map legend. It is formatted to use a landscape layout. |
Map Report Extended |
This report template supports a portrait report with a main map, one additional inset map, and a map legend. The additional map is shown in smaller size. If the additional map isn't set in the Maps array, it will be the same as the main map. |
Site Map Report |
This report template supports a portrait report with a main map and two inset maps. The map legend isn't supported with this template. The additional inset maps are shown in smaller size. If the first additional map isn't set in the Maps array, the main map with the extent of 1.25 size of the original extent is shown in place of it. If the second additional map isn't set in the Maps array, the main map with the extent of 0.75 size of the original extent is shown in place of it. |
Site Details Map |
This report template supports a portrait report with a main map and an additional information about the area mapped. The map legend isn't supported with this template. The additional information is specified with the Data parameter as an array of key/value pairs. This will help to fill in the values under the map image with the information provided in your request. The following keys are available for this report: "City", "State", "ZIP", "County", "CBSA", "Tract", and "BlockGroup". |
Each map report template contains information on how many map images should be generated. The report template also defines image parameters such as width, height and resolution. The "Map Report", "Map Report Landscape", and "Site Detailed Map" templates contain descriptions for one map therefore these templates produce reports with one main image. The "Map Report Extended" and "Site Map Report" templates describe two and three maps, respectively.
It is not possible to generate a report with fewer images than what is defined in the corresponding report template. If the request is sent to Business Analyst Server containing parameters for one (main) map, other maps (if described in the report template) will be created using parameters set for the main map. The map area for additional maps will have the same center point as the main map and extent with size scaled from main map’s extent. This behavior is described above, specifically for the "Map Report Extended" and "Site Map Report" templates.
Every map consists of the MapArea and MapDescriptions properties. The first one specifies an extent for the map and the last one is an array of MapDescription items.
Every MapDescription consists of MapURL, spatialReference, CustomGraphics, and Opacity properties:
Example Usage
Example 1 - The example below generates a Map Report Landscape with a polygon and a legend. Also, the report is saved to the repository.
{ "results": [ { "paramName":"Map Report Landscape.PDF", "dataType":"GPDataFile", "value": { "url":"http://localhost/arcgisoutput/_ags_T45E8DC78E4FBBA20BE1CDAC01B320.pdf" } } ], "messages": [ ] }
The results of the above request are shown below:
Example 2 - The example below generates a Map Report using the Site Details Map template.
{ "results": [ { "paramName":"Site Details Map.PDF", "dataType":"GPDataFile", "value": { "url":"http://localhost/arcgisoutput/_ags_T8D3FC72294F43AF0AC7FC63CD1EAD.pdf" } } ], "messages": [ ] }
Example 3 - The example below generates a Map Report using the Site Map Report template and specifies properties of a main map and two inset maps.
{ "results": [ { "paramName":"Site Map Report.PDF", "dataType":"GPDataFile", "value": { "url":"http://localhost/arcgisoutput/_ags_T7841FBDD44AC39C9B61D36DA3F24B.pdf" } } ], "messages": [ ] }
The results of the above request are shown below:
See Also