cgi label changing issues #4621

Closed
wants to merge 2 commits into
from

Projects

None yet

3 participants

@chaddean
chaddean commented Apr 2, 2013

With Mapserver 6.2 I'm experiencing the following issue when changing the label color in the URL. Mapserver is applying both the map file value and the value passed through the URL. Commenting out "type truetype" it will work as expected.

tmpmap136491287820916

http://localhost/cgi-bin/mapserv.exe?mode=map&map_resolution=120&map=103113b.map&map_size=300%20300&map.layer[bdrtemp].class[0]=LABEL+COLOR+255+0+0+END&layers=bdrtemp&map_projection=init=epsg:26914&mapext=617211%205312389%20618156%205313315&map_imagetype=AGG_JPEG

MAP
NAME "test"
CONFIG "PROJ_LIB" "c:/mapserver/proj-4.4.9/nad/"
EXTENT 617199 5311581 618965 5313346
FONTSET "C:\mapserver\fonts\fonts.txt"
IMAGETYPE "AGG_JPEG"
PROJECTION
"init=epsg:26914"
END
SIZE 500 500
UNITS METERS
OUTPUTFORMAT
NAME "AGG_JPEG"
DRIVER "AGG/JPEG"
IMAGEMODE "RGB"
END
LAYER
NAME "bdrtemp"
TYPE POLYGON
STATUS OFF
CLASS
LABEL
TYPE TRUETYPE
COLOR 0 255 0
FONT arial
SIZE 10
END
STYLE
OUTLINECOLOR 255 255 0
WIDTH 3
END
END
DATA "border"
LABELITEM "bdr_acres"
PROJECTION
"proj=latlong"
"ellps=GRS80"
"datum=NAD83"
END
END
END

@tbonfort
Member
tbonfort commented Apr 2, 2013

I suspect this is due to the multilabel support added in 6.2, the cgi parameters are creating a new label instead of modifying the existing one.
Might want to try:

map.layer[bdrtemp].class[0].label[0]=COLOR+255+0+0

ping @sdlime who should be able to pick up from here if that fails.

@chaddean
chaddean commented Apr 2, 2013

Making the change below filled the polygon.

From: Thomas Bonfort [mailto:notifications@github.com]
Sent: Tuesday, April 2, 2013 12:16 PM
To: mapserver/mapserver
Cc: Chad Ringenberg
Subject: Re: [mapserver] cgi label changing issues (#4621)

I suspect this is due to the multilabel support added in 6.2, the cgi parameters are creating a new label instead of modifying the existing one.
Might want to try:

map.layer[bdrtemp].class[0].label[0]=COLOR+255+0+0

ping @sdlimehttps://github.com/sdlime who should be able to pick up from here if that fails.


Reply to this email directly or view it on GitHubhttps://github.com/mapserver/mapserver/issues/4621#issuecomment-15789198.

@chaddean
chaddean commented Apr 2, 2013

After changing it to map.layer[bdrtemp].class[0].label[0]=COLOR+255+0+0 the result was a filled polygon.

test1

@sdlime
Member
sdlime commented Apr 2, 2013

Definitely a bug… I’ll have a look. --Steve

From: chaddean [mailto:notifications@github.com]
Sent: Tuesday, April 02, 2013 12:35 PM
To: mapserver/mapserver
Cc: Lime, Steve D (MNIT)
Subject: Re: [mapserver] cgi label changing issues (#4621)

After changing it to map.layer[bdrtemp].class[0].label[0]=COLOR+255+0+0 the result was a filled polygon.

[test1]https://f.cloud.github.com/assets/4038841/329710/2fb46db4-9bbb-11e2-8667-a9ffd85d909f.jpg


Reply to this email directly or view it on GitHubhttps://github.com/mapserver/mapserver/issues/4621#issuecomment-15790273.

@tbonfort
Member
tbonfort commented Apr 2, 2013

@sdlime, I'm working on it. Once this is a pull-request I'll let you validate what I did before applying, will ping you.

@tbonfort tbonfort Fix CGI commands after multiple label implementation (#4621)
This also needs to go to docs / migration guide.
64ad51d
@tbonfort
Member
tbonfort commented Apr 2, 2013

@sdlime #4621 is now an (untested) pull request, can you check the diff, I did the change from URL_STRING to URL_VARIABLE in the lexer without knowing the implications. Note that the flex/bison handling in the cmake build is borked for now, so your best bet is to run flex manually if you need to update the lexer.
@chaddean if you can test it, it would be great, although being applied to master the whole build process has changed since 6.2

@sdlime
Member
sdlime commented Apr 2, 2013

The changeset looks good to me, thanks for fixing. This should probably be backported to 6.2 branch as well.

Steve

From: Thomas Bonfort [mailto:notifications@github.com]
Sent: Tuesday, April 02, 2013 1:09 PM
To: mapserver/mapserver
Cc: Lime, Steve D (MNIT)
Subject: Re: [mapserver] cgi label changing issues (#4621)

@sdlimehttps://github.com/sdlime #4621#4621 is now an (untested) pull request, can you check the diff, I did the change from URL_STRING to URL_VARIABLE in the lexer without knowing the implications. Note that the flex/bison handling in the cmake build is borked for now, so your best bet is to run flex manually if you need to update the lexer.
@chaddeanhttps://github.com/chaddean if you can test it, it would be great, although being applied to master the whole build process has changed since 6.2


Reply to this email directly or view it on GitHubhttps://github.com/mapserver/mapserver/pull/4621#issuecomment-15792258.

@tbonfort
Member
tbonfort commented Apr 2, 2013

Steve,
Are there any nasty side-effects that could arise if we backport? The label handling was evidently borked before it, but I'm a bit weary about making such a change in the stable branch without groking all the implications.

@sdlime
Member
sdlime commented Apr 2, 2013

I’ll think about it more but basically support is busted in 6.2 so it would seem logical to fix it. I’ll go through the list of mutable parameters in a label and make sure.

@tbonfort tbonfort was assigned Apr 3, 2013
@tbonfort
Member
tbonfort commented Apr 3, 2013

applied to branch-6-2 and merged to master

@tbonfort tbonfort closed this Apr 3, 2013
@tbonfort tbonfort added a commit to mapserver/docs that referenced this pull request Apr 3, 2013
@tbonfort tbonfort added note about cgi label changes in 6.2.1 c5a0426
@mkofahl mkofahl pushed a commit to faegi/mapserver that referenced this pull request Apr 9, 2013
@tbonfort tbonfort fix cgi label commands after multi-label changes (#4621) 00f6fde
@tbonfort
Member

reopening this one before we release 6.2.1. @sdlime you can close it once you've checked the mutable labelObj members

@tbonfort tbonfort reopened this Apr 10, 2013
@sdlime
Member
sdlime commented Apr 17, 2013

Went through all the members and it looks ok... --Steve

@sdlime sdlime closed this Apr 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment