Closed catmorales closed 6 months ago
@catmorales The legend is visible but very small.
Currently the mapfish uses the iconSize
of the legend options in print tool to set width
and height
of the legend
Example: with internal layer | iconSize: 20 | iconSize: 40 | ||
---|---|---|---|---|
@tdipisa
To use the configured scale (i.e width and height) of the legend in layer settings, we can replace the Icon Size
with Width
and Height
fields in the Legend Options of the print tool and use legend sizes configured in the layer settings as these field values respectively
Kindly let me know your thoughts. Thanks!
and to avoid strange results, if the user changes one of width or height, automatically adjust the other so that the aspect ratio is kept ? i doubt anyone would want to resize a legend in a stretched/compressed way....
No, we won't adjust the size automatically. The user can visualize this change when modifying the width/height in the layer settings, so the user can know if the image is stretched/compressed and can enter a value that appears to fit best
Updated behavior
The print tool's Legend Options
will be modified to have two fields called Width
and Height
replacing the Icon Size
field along with a new checkbox field called Override icon size
. These new fields will hold the current default size of 24px
.
This override option will allow user to override legend's configured scale (width and height) set for the layer in the layer options and when more than one layer is present, this option will be applied for the all the applicable layers.
By default, this option will be unchecked, meaning the legend's width and height configured in layer will be used per layer
Reason: Print tool has a common option for all the layers selected for printing and cannot be made available per layer, hence a common option will be used for all layer when user prefer to override the icon size
Describe the bug When printing an image legend with the map, the size of the legend doesn't match with the size configured in the layer properties
To Reproduce Steps to reproduce the behavior:
Expected behavior Legend be visible like in the layer properties
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
mapstore-print (11).pdf