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

No way to turn off partial labels via SLD #5198

Closed
kungfujohnjon opened this Issue Nov 20, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@kungfujohnjon

kungfujohnjon commented Nov 20, 2015

Even with setting label_cache_map_edge_buffer and labelcache ON for each layer, there seems to be no way in MapServer to turn off partial labels via SLD. The temporary map file produced when DEBUG is turned on shows that the LABEL block contains no PARTIALS line, and the schema definition for the TextSymbolizer block in mapogcsld.c seems to provide no ability to specify such an option. GeoServer handles this with the VendorOption element within the TextSymbolizer block to set styling options that are not part of the SLD spec (e.g. false), but another option would be to be able to set PARTIALS default behavior via CGI or during MapServer compilation.

@tbonfort

This comment has been minimized.

Member

tbonfort commented Nov 20, 2015

I'm tempted to close this issue, as if SLD doesn't support the option, well, it doesn't support it :)
You should be able to override the partials with cgi commands try &map.layer[mylayer].class[myclass]=label+partials+false+end or &map.layer[mylayer].class[myclass].label=partials+false. Or just set partials false in your mapfile.

@tbonfort tbonfort closed this Nov 20, 2015

@tbonfort

This comment has been minimized.

Member

tbonfort commented Nov 20, 2015

and if you are OK to recompile, just set label->partials to MS_FALSE in mapfile.c->initLabel()

@kungfujohnjon

This comment has been minimized.

kungfujohnjon commented Nov 20, 2015

SLD defined styles don't exist as classes until the temporary map file is made, so the first solution throws a "Class to be modified not valid" error right now. For future reference in case others run into this issue, this does in fact require modifying the source and recompiling.

@tbonfort

This comment has been minimized.

Member

tbonfort commented Nov 20, 2015

FWIW if you want to make your case on the mapserver-dev mailing list, I'd be supportive of changing the default value of label->partials to false in the upcoming release. partial labels should be the exception, not the norm.

tbonfort added a commit to tbonfort/mapserver that referenced this issue Feb 23, 2016

tbonfort added a commit to mapserver/docs that referenced this issue Feb 23, 2016

@tbonfort tbonfort added this to the 7.2 Release milestone Feb 23, 2016

@tbonfort tbonfort reopened this Feb 23, 2016

tbonfort added a commit to mapserver/msautotest_DEPRECATED that referenced this issue Feb 23, 2016

tbonfort added a commit to tbonfort/mapserver that referenced this issue Feb 23, 2016

@tbonfort

This comment has been minimized.

Member

tbonfort commented Feb 23, 2016

Applied to master (upcoming 7.2) in 590d513

@tbonfort tbonfort closed this Feb 23, 2016

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