-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathattributes.html
1428 lines (1181 loc) · 52.2 KB
/
attributes.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MapFish Print 3 Documentation - Attributes</title>
<link rel="stylesheet" href="css/sphinx_rtd_theme.css" type="text/css" />
<link rel="stylesheet" href="css/readthedocs-doc-embed.css" type="text/css" />
<link rel="stylesheet" href="css/custom.css" type="text/css" />
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> MapFish Print 3</a>
</div>
<div
class="wy-menu wy-menu-vertical"
data-spy="affix"
role="navigation"
aria-label="main navigation"
>
<ul class="current">
<li class="toctree-l1 ">
<a class="reference internal " href="index.html">Introduction</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="jasperreports.html"
>JasperReports</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="api.html">Web API</a>
</li>
<li class="toctree-l1 current">
<a class="reference internal current" href="attributes.html">Attributes</a>
<ul>
<li class="toctree-l2">
<a class="reference internal" href="#!boolean">!boolean</a>
<li class="toctree-l2">
<a class="reference internal" href="#!datasource">!datasource</a>
<li class="toctree-l2">
<a class="reference internal" href="#!features">!features</a>
<li class="toctree-l2">
<a class="reference internal" href="#!float">!float</a>
<li class="toctree-l2">
<a class="reference internal" href="#!integer">!integer</a>
<li class="toctree-l2">
<a class="reference internal" href="#!jsonDatasource">!jsonDatasource</a>
<li class="toctree-l2">
<a class="reference internal" href="#!legend">!legend</a>
<li class="toctree-l2">
<a class="reference internal" href="#!map">!map</a>
<li class="toctree-l2">
<a class="reference internal" href="#!northArrow">!northArrow</a>
<li class="toctree-l2">
<a class="reference internal" href="#!overviewMap">!overviewMap</a>
<li class="toctree-l2">
<a class="reference internal" href="#!paging">!paging</a>
<li class="toctree-l2">
<a class="reference internal" href="#!scalebar">!scalebar</a>
<li class="toctree-l2">
<a class="reference internal" href="#!staticLayers">!staticLayers</a>
<li class="toctree-l2">
<a class="reference internal" href="#!string">!string</a>
<li class="toctree-l2">
<a class="reference internal" href="#!stringArray">!stringArray</a>
<li class="toctree-l2">
<a class="reference internal" href="#!style">!style</a>
<li class="toctree-l2">
<a class="reference internal" href="#!table">!table</a>
</li>
</ul>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="configuration.html"
>Configuration</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="layers.html">Map Layers</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="processors.html">Processors</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="fileloaders.html">File-Loaders</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="outputformats.html"
>Output Formats</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="styles.html">Styles</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="tableimages.html"
>Images in tables</a
>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="download.html">Download</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="docker.html">Docker</a>
</li>
<li class="toctree-l1 ">
<a class="reference internal " href="scaling.html">Horizontal scaling</a>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">MapFish Print 3</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>Attributes</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/mapfish/mapfish-print" class="fa fa-github">
mapfish/mapfish-print</a
>
</li>
</ul>
<hr />
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<h1>Attributes</h1>
<div class="section"><p>
An attribute is a value that a processor requires as its input (if it is not satisfied by the output of
another processor) or the report template. An attribute represents one or more values. Usually simple values
(numbers, strings, etc...) are values required by the report template but on occasion they might be required
by a processor. Typically a processor will require a specific attribute type, for example the
<a href="processors.html#!createMap">!createMap</a> processor requires a
<a href="attributes.html#!map">!map</a>
attribute, which contains all of the information required to render a map (layers, bbox, projections,
etc...)
</p>
<p>
Attributes are declared in the configuration yaml file in the !attribute block. The attribute block is a map
of name - > attributeType pairs. This means that each attribute consists of a name and a type. Each
processor has a inputs which must be satisfied by an attribute or the output of another processor. Each
input has a name/key that is used to look up the attribute (or output). If an input of a processor is not
satisfied, an error will be reported to the client detailing the attribute(s) that are missing.
</p>
<p>
All attributes can have a <em>default</em> block where the values of the attribute can be supplied. As the
term implies, an attribute with default values does not need to be supplied by the client (although they can
be overridden). Further, if an attribute has multiple values the default block may only provide defaults for
a subset of the values (the client must supply the rest).
</p>
<p>
Defaults provide a way to make the API the client must use to be very simple (when designing a custom
client) but remain flexible.
</p>
<p>
<strong>Example</strong>
</p>
<p>
<code>config.yaml</code>
</p>
<div class="highlight-yaml">
<div class="highlight">
<pre>
templates:
A4 portrait: !template
reportTemplate: simpleReport.jrxml
attributes:
number: !integer {}
title: !string {}
description: !string {}
map: !map
height: 200
width: 400</pre
>
</div>
</div>
<p>
<code>request.json</code>
</p>
<div class="highlight-json">
<div class="highlight">
<pre>
{
"layout": "A4 portrait",
"outputFormat": "pdf",
"attributes": {
"number": 45,
"title": "The map",
"description": "A map showing...",
"map": {
"bbox": [100, -1, 106, 2],
"projection": "CRS:84",
"dpi": 72,
...
}
}
}
</pre
>
</div>
</div>
<
</div>
<div class="section" id="!boolean">
<h1>!boolean<a class="headerlink" href="#!boolean" title="Permalink to this headline">¶</a></h1>
<div class="block">A boolean type attribute. </div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">A default value for this attribute. Example:
<div class="highlight"><pre> attributes:<br> title: !boolean<br> default: True</pre></div></div></dd>
</dl>
</div>
<div class="section" id="!datasource">
<h1>!datasource<a class="headerlink" href="#!datasource" title="Permalink to this headline">¶</a></h1>
<div class="block">This attribute represents a collection of attributes which can be used as the data source of a
Jasper report's table/detail section.
<p>For example consider the case where the report should contain multiple tables or charts but
the number of reports may change depending on the request. In this case the client will post a
datasource attribute json object containing an array of all the table attribute objects. The
<a shape="rect" href="../processor/jasper/DataSourceProcessor.html" title="class in org.mapfish.print.processor.jasper"><code>DataSourceProcessor</code></a> will process the datasource
attribute and create a Jasper datasource that contains all the tables.
</p><p>This datasource must be used in tandem with the <a shape="rect" href="../processor/jasper/DataSourceProcessor.html" title="class in org.mapfish.print.processor.jasper"><code>DataSourceProcessor</code></a> processor (see <a shape="rect" href="processors.html#!createDataSource">!createDataSource</a> processor).
</p><p>The json data of this attribute is special since it represents an array of attributes, each
element in the array must contain all of the attributes required to satisfy the processors in the
<a shape="rect" href="../processor/jasper/DataSourceProcessor.html" title="class in org.mapfish.print.processor.jasper"><code>DataSourceProcessor</code></a>.
</p><p>Example configuration:
</p><div class="highlight"><pre> datasource: !datasource<br> table: !table<br> map: !map<br> width: 200<br> height: 100</pre></div><p>Example request data:
</p><div class="highlight"><pre> datasource: [<br> {<br> table: {<br> ... // normal table attribute data<br> },<br> map: {<br> ... // normal map attribute data<br> }<br> }, {<br> table: {<br> ... // normal table attribute data<br> },<br> map: {<br> ... // normal map attribute data<br> }<br> }<br> ]</pre></div>
[[examples=verboseExample,datasource_dynamic_tables,datasource_many_dynamictables_legend,
datasource_multiple_maps,customDynamicReport,report]]</div>
<h3>Configuration</h3>
<dl>
<dt><code>attributes</code> </dt>
<dd><div class="block">The attributes that are acceptable by this dataSource. The format is the same as the template
attributes section.</div></dd>
</dl>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">Default values for this attribute. Example:
<div class="highlight"><pre> attributes:<br> datasource: !datasource<br> attributes:<br> name: !string {}<br> count: !integer {}<br> default:<br> - name: "name"<br> - count: 3</pre></div></div></dd>
</dl>
</div>
<div class="section" id="!features">
<h1>!features<a class="headerlink" href="#!features" title="Permalink to this headline">¶</a></h1>
<div class="block">Attribute for GeoJson feature collection. </div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/report"
target="_blank"
class="fa fa-book"
> report</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">Default values for this attribute. Example:
<div class="highlight"><pre> attributes:<br> legend: !legend<br> default:<br> name: "Legend"</pre></div></div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>features</code> required</dt>
<dd><div class="block">The geojson features.</div></dd>
</dl>
<dl>
<dt><code>longitudeFirst</code> </dt>
<dd><div class="block">By default the normal axis order as specified in EPSG code will be used when parsing
projections. However the requester can override this by explicitly declaring that longitude
axis is first.</div></dd>
</dl>
</div>
<div class="section" id="!float">
<h1>!float<a class="headerlink" href="#!float" title="Permalink to this headline">¶</a></h1>
<div class="block">A float type attribute. </div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">A default value for this attribute. Example:
<div class="highlight"><pre> attributes:<br> title: !float<br> default: 4.2</pre></div></div></dd>
</dl>
</div>
<div class="section" id="!integer">
<h1>!integer<a class="headerlink" href="#!integer" title="Permalink to this headline">¶</a></h1>
<div class="block">An integer type attribute. </div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">A default value for this attribute. Example:
<div class="highlight"><pre> attributes:<br> title: !integer<br> default: 42</pre></div></div></dd>
</dl>
</div>
<div class="section" id="!jsonDatasource">
<h1>!jsonDatasource<a class="headerlink" href="#!jsonDatasource" title="Permalink to this headline">¶</a></h1>
<div class="block">A JSON data source attribute. To be declared as net.sf.jasperreports.engine.data.JsonDataSource
in Jasper. Accepts only JSON objects at the root. To use it, you must pass it to a sub report
like that:
<div class="highlight"><pre> < subreport><br> ...<br> < dataSourceExpression><br> < ![CDATA[$P{json_attribute}.subDataSource("path.to.list")]]><br> < /dataSourceExpression><br> < subreportExpression><![CDATA["subreport_name.jasper"]]>< /subreportExpression><br> < /subreport></pre></div><p>The expression given to the subDataSource method must select an array in the JSON structure.</p></div> </div>
<div class="section" id="!legend">
<h1>!legend<a class="headerlink" href="#!legend" title="Permalink to this headline">¶</a></h1>
<div class="block">Objects needed by the <a shape="rect" href="../processor/jasper/LegendProcessor.html" title="class in org.mapfish.print.processor.jasper"><code>LegendProcessor</code></a> (see <a shape="rect" href="processors.html#!prepareLegend">!prepareLegend</a> processor).
</div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
> <a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/legend_cropped"
target="_blank"
class="fa fa-book"
> legend_cropped</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">Default values for this attribute. Example:
<div class="highlight"><pre> attributes:<br> legend: !legend<br> default:<br> name: "Legend"</pre></div></div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>classes</code> </dt>
<dd><div class="block">Other embedded classes.</div></dd>
</dl>
<dl>
<dt><code>dpi</code> </dt>
<dd><div class="block">DPI of the legend icons.</div></dd>
</dl>
<dl>
<dt><code>icons</code> </dt>
<dd><div class="block">Urls for downloading icons for each legend row.</div></dd>
</dl>
<dl>
<dt><code>name</code> </dt>
<dd><div class="block">Name of the legend class.</div></dd>
</dl>
</div>
<div class="section" id="!map">
<h1>!map<a class="headerlink" href="#!map" title="Permalink to this headline">¶</a></h1>
<div class="block">The attributes for <a shape="rect" href="../../processor/map/CreateMapProcessor.html" title="class in org.mapfish.print.processor.map"><code>CreateMapProcessor</code></a> (see <a shape="rect" href="processors.html#!createMap">!createMap</a> processor). </div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">Default values for this attribute. Example:
<div class="highlight"><pre> attributes:<br> legend: !legend<br> default:<br> name: "Legend"</pre></div></div></dd>
</dl>
<dl>
<dt><code>dpiSuggestions</code> </dt>
<dd><div class="block">Suggestions for DPI values to use. Typically these are used by the client to create a UI for a
user.</div></dd>
</dl>
<dl>
<dt><code>height</code> </dt>
<dd><div class="block">The height of the map in pixels. This value should match the height of the sub-report in the
JasperReport template.</div></dd>
</dl>
<dl>
<dt><code>maxDpi</code> </dt>
<dd><div class="block">The maximum DPI allowed for maps.
<p>If a request is made with a higher DPI, the request fails.</p></div></dd>
</dl>
<dl>
<dt><code>maxHeight</code> </dt>
<dd><div class="block">Limits the maximum height of the map.</div></dd>
</dl>
<dl>
<dt><code>maxWidth</code> </dt>
<dd><div class="block">Limits the maximum width of the map.</div></dd>
</dl>
<dl>
<dt><code>width</code> </dt>
<dd><div class="block">The width of the map in pixels. This value should match the width of the sub-report in the
JasperReport template.</div></dd>
</dl>
<dl>
<dt><code>zoomLevelSnapStrategy</code> </dt>
<dd><div class="block">The strategy to use to compute the actual zoom level to use.
<p>If you specify this value, you must set the zoomLevels as well.
</p><p>Possible values are:
</p><ul><li>CLOSEST_LOWER_SCALE_ON_TIE: Find the closest zoom level. If the targetScale is directly
between two zoomLevels then the smaller/higher resolution scale will be chosen.
</li><li>CLOSEST_HIGHER_SCALE_ON_TIE: Find the closest zoom level. If the targetScale is directly
between two zoomLevels then the larger/lower resolution scale will be chosen.
</li><li>HIGHER_SCALE: Always choose the zoom-level that is just higher than the target value.
</li><li>LOWER_SCALE: Always choose the zoom-level that is just lower than the target value.
</li></ul><p></p></div></dd>
</dl>
<dl>
<dt><code>zoomLevels</code> </dt>
<dd><div class="block">The list of Zoom Levels.
<p>Depending on the zoomLevelSnapStrategy, this will be used to compute the actual zoom level
of the map.</p></div></dd>
</dl>
<dl>
<dt><code>zoomSnapGeodetic</code> </dt>
<dd><div class="block">If true, snap to geodetic scales.</div></dd>
</dl>
<dl>
<dt><code>zoomSnapTolerance</code> </dt>
<dd><div class="block">The zoom level tolerance.
<p>Used in ZoomLevelSnapStrategy.HIGHER_SCALE and ZoomLevelSnapStrategy.LOWER_SCALE to specify
the cutoff value.</p></div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>areaOfInterest</code> </dt>
<dd><div class="block">A GeoJSON geometry that is essentially the area of the area to draw on the map.</div></dd>
</dl>
<dl>
<dt><code>bbox</code> required</dt>
<dd><div class="block">An array of 4 doubles, minX, minY, maxX, maxY. The bounding box of the map.
<p>Either the bbox or the center + scale must be defined</p></div></dd>
</dl>
<dl>
<dt><code>center</code> required</dt>
<dd><div class="block">An array of 2 doubles, (x, y). The center of the map.</div></dd>
</dl>
<dl>
<dt><code>dpi</code> required</dt>
<dd><div class="block">The output dpi of the printed map.</div></dd>
</dl>
<dl>
<dt><code>dpiSensitiveStyle</code> </dt>
<dd><div class="block">Should the vector style definitions be adapted to the target DPI resolution? (Default: true)
<p>The style definitions are often optimized for a use with OpenLayers (which uses a DPI
value of 72). When these styles are used to print with a higher DPI value, lines often look
too thin, label are too small, etc.
</p><p>If this property is set to `true`, the style definitions will be scaled to the target DPI
value.</p></div></dd>
</dl>
<dl>
<dt><code>height</code> </dt>
<dd><div class="block">The height of the map.</div></dd>
</dl>
<dl>
<dt><code>layers</code> </dt>
<dd><div class="block">The json with all the layer information. This will be parsed in postConstruct into a list of
layers and therefore this field should not normally be accessed.
<p>The first layer in the array will be the top layer in the map. The last layer in the array
will be the bottom layer in the map. There for the last layer will be hidden by the first
layer (where not transparent).</p></div></dd>
</dl>
<dl>
<dt><code>longitudeFirst</code> </dt>
<dd><div class="block">By default the normal axis order as specified in EPSG code will be used when parsing
projections. However the requester can override this by explicitly declaring that longitude
axis is first.</div></dd>
</dl>
<dl>
<dt><code>pdfA</code> </dt>
<dd><div class="block">Whether to merge all layers into one. This is great to reduce pdf size but needs layers
having an imagebufferscaling of 1. Also see the pdfA option of the print config.</div></dd>
</dl>
<dl>
<dt><code>projection</code> </dt>
<dd><div class="block">The projection of the map.</div></dd>
</dl>
<dl>
<dt><code>rotation</code> </dt>
<dd><div class="block">The rotation of the map.</div></dd>
</dl>
<dl>
<dt><code>scale</code> </dt>
<dd><div class="block">If center is defined then this is the scale of the map centered at center.</div></dd>
</dl>
<dl>
<dt><code>useAdjustBounds</code> </dt>
<dd><div class="block">Indicates if the map should adjust its bounds.</div></dd>
</dl>
<dl>
<dt><code>useNearestScale</code> </dt>
<dd><div class="block">Indicates if the map should adjust its scale/zoom level to be equal to one of those defined
in the configuration file.</div></dd>
</dl>
<dl>
<dt><code>width</code> </dt>
<dd><div class="block">The width of the map.</div></dd>
</dl>
<dl>
<dt><code>zoomToFeatures</code> required</dt>
<dd><div class="block">Zoom the map to the features of a specific layer or all features of the map.</div></dd>
</dl>
</div>
<div class="section" id="!northArrow">
<h1>!northArrow<a class="headerlink" href="#!northArrow" title="Permalink to this headline">¶</a></h1>
<div class="block">The attributes for <a shape="rect" href="../processor/map/CreateNorthArrowProcessor.html" title="class in org.mapfish.print.processor.map"><code>CreateNorthArrowProcessor</code></a> (see <a shape="rect" href="processors.html#!createNorthArrow">!createNorthArrow</a> processor).
</div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
> <a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/print_osm_new_york_nosubreports"
target="_blank"
class="fa fa-book"
> print_osm_new_york_nosubreports</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>createSubReport</code> </dt>
<dd><div class="block">Specifies whether a subreport should be created, or only a graphic.</div></dd>
</dl>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">Default values for this attribute. Example:
<div class="highlight"><pre> attributes:<br> legend: !legend<br> default:<br> name: "Legend"</pre></div></div></dd>
</dl>
<dl>
<dt><code>size</code> </dt>
<dd><div class="block">The size (width and height) of the north-arrow graphic in the JasperReport template.
<p>The graphic is a square so that the arrow can be rotated properly.</p></div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>backgroundColor</code> </dt>
<dd><div class="block">The background color for the north-arrow graphic (default: rgba(255, 255, 255, 0)).</div></dd>
</dl>
<dl>
<dt><code>graphic</code> </dt>
<dd><div class="block">The path to a graphic to use for the north-arrow.
<p>It can either be an URL ("http://xyx.com/img/north-arrow.png") or a file in the
configuration folder ("file://NorthArrow.svg"). Both SVG graphics and raster graphics (png,
jpeg, tiff, ...) are supported.
</p><p>While the resulting graphic used in the JasperReport template is a square, this graphic
can have an arbitrary aspect ratio. The graphic will be scaled to the output size and rotated
around its center.
</p><p>If no graphic is given, a default north-arrow is used.</p></div></dd>
</dl>
</div>
<div class="section" id="!overviewMap">
<h1>!overviewMap<a class="headerlink" href="#!overviewMap" title="Permalink to this headline">¶</a></h1>
<div class="block">The attributes for an overview map (see <a shape="rect" href="processors.html#!createOverviewMap">!createOverviewMap</a> processor).
</div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/verboseExample"
target="_blank"
class="fa fa-book"
> verboseExample</a
> <a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/overviewmap_tyger_ny_EPSG_3857"
target="_blank"
class="fa fa-book"
> overviewmap_tyger_ny_EPSG_3857</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">Default values for this attribute. Example:
<div class="highlight"><pre> attributes:<br> legend: !legend<br> default:<br> name: "Legend"</pre></div></div></dd>
</dl>
<dl>
<dt><code>dpiSuggestions</code> </dt>
<dd><div class="block">Suggestions for DPI values to use. Typically these are used by the client to create a UI for a
user.</div></dd>
</dl>
<dl>
<dt><code>height</code> </dt>
<dd><div class="block">The height of the map in pixels. This value should match the height of the sub-report in the
JasperReport template.</div></dd>
</dl>
<dl>
<dt><code>maxDpi</code> </dt>
<dd><div class="block">The maximum DPI allowed for maps.
<p>If a request is made with a higher DPI, the request fails.</p></div></dd>
</dl>
<dl>
<dt><code>maxHeight</code> </dt>
<dd><div class="block">Limits the maximum height of the map.</div></dd>
</dl>
<dl>
<dt><code>maxWidth</code> </dt>
<dd><div class="block">Limits the maximum width of the map.</div></dd>
</dl>
<dl>
<dt><code>style</code> </dt>
<dd><div class="block">The style name of a style to apply to the bbox rectangle of the original map during rendering.
The style name must map to a style in the template or the configuration objects.</div></dd>
</dl>
<dl>
<dt><code>width</code> </dt>
<dd><div class="block">The width of the map in pixels. This value should match the width of the sub-report in the
JasperReport template.</div></dd>
</dl>
<dl>
<dt><code>zoomFactor</code> </dt>
<dd><div class="block">The zoom factor by which the extent of the main map will be augmented to create an overview.</div></dd>
</dl>
<dl>
<dt><code>zoomLevelSnapStrategy</code> </dt>
<dd><div class="block">The strategy to use to compute the actual zoom level to use.
<p>If you specify this value, you must set the zoomLevels as well.
</p><p>Possible values are:
</p><ul><li>CLOSEST_LOWER_SCALE_ON_TIE: Find the closest zoom level. If the targetScale is directly
between two zoomLevels then the smaller/higher resolution scale will be chosen.
</li><li>CLOSEST_HIGHER_SCALE_ON_TIE: Find the closest zoom level. If the targetScale is directly
between two zoomLevels then the larger/lower resolution scale will be chosen.
</li><li>HIGHER_SCALE: Always choose the zoom-level that is just higher than the target value.
</li><li>LOWER_SCALE: Always choose the zoom-level that is just lower than the target value.
</li></ul><p></p></div></dd>
</dl>
<dl>
<dt><code>zoomLevels</code> </dt>
<dd><div class="block">The list of Zoom Levels.
<p>Depending on the zoomLevelSnapStrategy, this will be used to compute the actual zoom level
of the map.</p></div></dd>
</dl>
<dl>
<dt><code>zoomSnapGeodetic</code> </dt>
<dd><div class="block">If true, snap to geodetic scales.</div></dd>
</dl>
<dl>
<dt><code>zoomSnapTolerance</code> </dt>
<dd><div class="block">The zoom level tolerance.
<p>Used in ZoomLevelSnapStrategy.HIGHER_SCALE and ZoomLevelSnapStrategy.LOWER_SCALE to specify
the cutoff value.</p></div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>bbox</code> </dt>
<dd><div class="block">An array of 4 doubles, minX, minY, maxX, maxY. The bounding box of the overview-map.
<p>If a bounding box is given, the overview-map shows a fixed extent. The configuration
parameter <code>zoomFactor</code> is ignored in this case.</p></div></dd>
</dl>
<dl>
<dt><code>center</code> </dt>
<dd><div class="block">An array of 2 doubles, (x, y). The center of the overview-map.
<p>If center and scale are given, the overview-map shows a fixed extent. The configuration
parameter <code>zoomFactor</code> is ignored in this case.</p></div></dd>
</dl>
<dl>
<dt><code>dpi</code> </dt>
<dd><div class="block">The output dpi of the printed map.</div></dd>
</dl>
<dl>
<dt><code>dpiSensitiveStyle</code> </dt>
<dd><div class="block">Should the vector style definitions be adapted to the target DPI resolution? (Default: true)
<p>The style definitions are often optimized for a use with OpenLayers (which uses a DPI
value of 72). When these styles are used to print with a higher DPI value, lines often look
too thin, label are too small, etc.
</p><p>If this property is set to `true`, the style definitions will be scaled to the target DPI
value.</p></div></dd>
</dl>
<dl>
<dt><code>height</code> </dt>
<dd><div class="block">The height of the map.</div></dd>
</dl>
<dl>
<dt><code>layers</code> </dt>
<dd><div class="block">The json with all the layer information. This will be parsed in postConstruct into a list of
layers and therefore this field should not normally be accessed.</div></dd>
</dl>
<dl>
<dt><code>longitudeFirst</code> </dt>
<dd><div class="block">By default the normal axis order as specified in EPSG code will be used when parsing
projections. However the requester can override this by explicitly declaring that longitude
axis is first.</div></dd>
</dl>
<dl>
<dt><code>pdfA</code> </dt>
<dd><div class="block">Whether to merge all layers into one. This is great to reduce pdf size but needs layers
having an imagebufferscaling of 1. Also see the pdfA option of the print config.</div></dd>
</dl>
<dl>
<dt><code>projection</code> </dt>
<dd><div class="block">The projection of the map.</div></dd>
</dl>
<dl>
<dt><code>rotation</code> </dt>
<dd><div class="block">The rotation of the map.</div></dd>
</dl>
<dl>
<dt><code>scale</code> </dt>
<dd><div class="block">If <code>center</code> is defined then this is the scale of the map centered at <code>center<br> </code>.</div></dd>
</dl>
<dl>
<dt><code>useAdjustBounds</code> </dt>
<dd><div class="block">Indicates if the map should adjust its bounds.</div></dd>
</dl>
<dl>
<dt><code>useNearestScale</code> </dt>
<dd><div class="block">Indicates if the map should adjust its scale/zoom level to be equal to one of those defined
in the configuration file.</div></dd>
</dl>
<dl>
<dt><code>width</code> </dt>
<dd><div class="block">The width of the map.</div></dd>
</dl>
</div>
<div class="section" id="!paging">
<h1>!paging<a class="headerlink" href="#!paging" title="Permalink to this headline">¶</a></h1>
<div class="block">Attribute that defines how a map is displayed across many pages.
<p>This is used by the <a shape="rect" href="processors.html#!paging">paging processor</a>.
</p></div>
<div class="admonition note examples">
<p class="first admonition-title">Example</p>
<p class="last">
<a
href="https://github.com/mapfish/mapfish-print/tree/master/examples/src/test/resources/examples/paging"
target="_blank"
class="fa fa-book"
> paging</a
>
</p>
</div>
<h3>Configuration</h3>
<dl>
<dt><code>default</code> </dt>
<dd><div class="block">Default values for this attribute. Example:
<div class="highlight"><pre> attributes:<br> legend: !legend<br> default:<br> name: "Legend"</pre></div></div></dd>
</dl>
<h3>Inputs</h3>
<dl>
<dt><code>aoiDisplay</code> </dt>
<dd><div class="block">Indicates how to render the area of interest on this sub-map. This makes it easier to how the
all the sub-maps fit together to for the complete map. Also if the map is rendered as a whole
in one part of the report one can easily see where in the complete map the sub-map fits, even
without looking at the labeling.
<p>For options see: <a shape="rect" href="AreaOfInterest.AoiDisplay.html" title="enum class in org.mapfish.print.attribute.map"><code>AreaOfInterest.AoiDisplay</code></a></p><p>By default the rendering in the <a shape="rect" href="index.html#/attributes?location=!map">map
attribute's</a> area of interest will be used</p></div></dd>
</dl>
<dl>
<dt><code>aoiStyle</code> </dt>
<dd><div class="block">If this is defined it will override the style used for rendering the Area Of Interest in the
main <a shape="rect" href="index.html#/attributes?location=!map">map attribute's</a> Area of Interest
definition.</div></dd>
</dl>
<dl>
<dt><code>overlap</code> </dt>
<dd><div class="block">The amount that each page/sub-map should overlap each other.
<p>For example if the value is 1 and the projection of the map is degrees then the overlap
will be 1 degree.
</p><p>The default is to not have any overlap.</p></div></dd>
</dl>
<dl>
<dt><code>scale</code> required</dt>
<dd><div class="block">The scale denominator for each page/sub-map.</div></dd>
</dl>
</div>
<div class="section" id="!scalebar">
<h1>!scalebar<a class="headerlink" href="#!scalebar" title="Permalink to this headline">¶</a></h1>
<div class="block">The attributes for <a shape="rect" href="../processor/map/scalebar/CreateScalebarProcessor.html" title="class in org.mapfish.print.processor.map.scalebar"><code>CreateScalebarProcessor</code></a> (see
<a shape="rect" href="processors.html#!createScalebar">!createScalebar</a> processor).