Skip to content
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 from
Closed

Wrong resolution factor during LegendIcon creation with KEYIMAGE #4885

wants to merge 1 commit into from

Conversation

tbonfort
Copy link
Member

@tbonfort 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
Copy link
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
Copy link
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
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants