I'm using the createLegendIcon class method with PHP Mapscript to generate a high resolution legend.
The RESOLUTION value in the mapfile is modified with php the script to obtain a 300 DPI legend icon.
Problem is, if the class has a KEYIMAGE defined, the symbol is scaled wrongly and zoomed way too much.
My solution is to modify maplegend.c at line 223, in function msDrawLegendIcon, and remove image_draw->resolutionfactor when theclass->keyimage != NULL:
Don't apply scalefactor on legend keyimage (#4885)
@sdlime any reason we should not apply this one? Seems reasonable not to scale up a legend image if it has been explicitely supplied by the user. Side effect here will be a legend icon that does not expand in size when changing resolution ....
I can't think of any reason not to apply. Side affect seems pretty minor since not that many folks use the resolution parameter. -- Steve
applied in 7b86158