-
-
Notifications
You must be signed in to change notification settings - Fork 364
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
PHP mapscript - labels not draw with PostLabelCache set #5142
PHP mapscript - labels not draw with PostLabelCache set #5142
Conversation
|
Ian, how are you setting the PostLabelCache parameter? Do you have a code snippet? If after you set the parameter if you do a $map->save() or write() (can't remember the syntax) what does the resulting mapfile look like? The behavior doesn't make any sense to me since no value for postlabelcache can disable labeling. Steve |
|
Steve, We have had a closer look and we cannot make sense of what has happened. It looks like the merge into the trunk was not successful for the php mapscript code as there are multiple differences between the 6.4 branch we had bene using and the 7.0 trunk. I do not know if say the anti alias and type was removed on purpose, CMakeLists.txt in mapscript/php does not have labelcache.c and labelcachemember.c. I did make contact with Thomas who sounded like he would be back from vacation next week so hopefully he can explain. Bottom line is that we believe 7.0 php mapscript is broken. Regards Ian From: Steve Lime [mailto:notifications@github.com] Ian, how are you setting the PostLabelCache parameter? Do you have a code snippet? If after you set the parameter if you do a $map->save() or write() (can't remember the syntax) what does the resulting mapfile look like? The behavior doesn't make any sense to me since no value for postlabelcache can disable labeling. Steve — |
|
Have to tried master? I doubt much work was done in PHP/MapScript other than a few small changes made to make things compile - the change around transparency/opacity would be one area. |
|
Steve, There are a lot of differences between 6.4 and 7.0 including multiple sections disabled with ifdef’s. I am not sure how this evolved, from a quick look it feels like these were disabled for development and not re-enabled but I may well be wring. Regards Ian From: Steve Lime [mailto:notifications@github.com] Have to tried master? I doubt much work was done in PHP/MapScript other than a few small changes made to make things compile - the change around transparency/opacity would be one area. — |
|
@ianwalberg can you send a minimal testcase that exhibits this. Setting/getting the |
|
Thomas, We will get you something this week. Regards Ian From: Thomas Bonfort [mailto:notifications@github.com] @ianwalberghttps://github.com/ianwalberg can you send a minimal testcase that exhibits this. Setting/getting the layer->postlabelcache hasn't changed as far as I see. The code that was disabled is the direct manipulation of the labelcache and labelcache members themselves which were messing with mapserver's internals and should not have been exposed in the first place (IMO), and were essentially already broken since label priorities were added to mapserver. — |
|
ping @ianwalberg |
|
@ianwalberg I'll let you try out the proposed fix attached here and report back. |
|
Thomas, Where do we find the attached file? Thanks Ian From: Thomas Bonfort [mailto:notifications@github.com] @ianwalberghttps://github.com/ianwalberg I'll let you try out the proposed fix attached here and report back. — |
|
You'll see the diff directly from the issue page on github. |
|
I rebuilt with the changes to mapdraw.c and the simple test case works now. We will built our complete application tomorrow and see if this works. What do you think was happening? |
|
With the changes to mapdraw.c we now get this error with our full application. maplabel.c:166: msComputeTextPath: Assertion `ts->annotext && *ts->annotext' failed. The simple test case seems ok and it will take us a little more time to track down what is causing this error. What could the error mean? |
|
Before sending a complete test case, can you already send a complete backtrace? |
|
#0 0xb7fff424 in *kernel_vsyscall () |
|
in a138147 I have added a fix for handling empty labels when not using the labelcache, which seems to be your case. |
|
That seems to have fixed our issue, we will test more today but first tests look good. |
|
From our tests this looks good. Thanks |
|
applied to branch-7-0 |
Using PHP Mapscript it appears that when PostLabelCache is set to '1' for a label layer this causes the label text not to display.
With a map file this works as expected.
Looking in the mapscript/php source directory there are mutiple '#ifdef disabled' around the labelcache functions.