New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong resolution factor during LegendIcon creation with KEYIMAGE #4885

Closed
wants to merge 1 commit into
base: branch-6-4
from

Conversation

Projects
None yet
2 participants
@tbonfort
Member

tbonfort commented Mar 24, 2014

MapServer 6.4.1.
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:
msDrawMarkerSymbol(&map->symbolset,image_draw,&marker,&imgStyle,lp->scalefactor);

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Mar 24, 2014

Member

@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 ....

Member

tbonfort commented Mar 24, 2014

@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 ....

@sdlime

This comment has been minimized.

Show comment
Hide comment
@sdlime

sdlime Mar 24, 2014

Member

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

Member

sdlime commented Mar 24, 2014

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

@tbonfort

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Mar 27, 2014

Member

applied in 7b86158

Member

tbonfort commented Mar 27, 2014

applied in 7b86158

@tbonfort tbonfort closed this Mar 27, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment