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

TextSymbolizer doesn't align mutliline text correctly #3149

Open
tobwen opened this issue Oct 27, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@tobwen
Copy link

commented Oct 27, 2015

I'm on Mapnik v3.0.8 and have forced wrapping using wrap-width="10" in my XML stylefile.
Some multiline streetnames, like Wilhelm-Dilthey-Straße and August-Schmidt-Straße seem to be out of alignment. I'm expecting the texts to be centered on multiple lines. Anyone with an idea?
text out of alignment

The wiki says, neither vertical-alignment no horizontal-alignment relate to lines, but changing these values have a contraprodutive result on the data.

Wow, I've just zoomed in... things are getting worse.
text out of alignment

@tobwen tobwen changed the title TextSymbolizer doesn't center text correctly TextSymbolizer doesn't align mutliline text correctly Oct 27, 2015

@springmeyer

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

Definitely looks like a bug. Odd that we've not seen or had this reported before. I wonder what is triggering it. Can you try to reduce the testcase to something that is easy to share? See https://github.com/mapnik/mapnik/wiki/A-perfect-testcase for tips.

@tobwen

This comment has been minimized.

Copy link
Author

commented Oct 27, 2015

This is the geometry from my OSM database. I can't check the testcase, since CSV-plugin hasn't been compiled here.

wkt|label
LINESTRING(7.4142493 51.4844719,7.414334 51.4845126,7.4144997 51.4845922,7.4148741 51.4847266,7.4150511 51.4847851,7.4152473 51.4848499,7.4154478 51.4849161,7.4157144 51.4850035,7.4159984 51.485106,7.4160088 51.4851096,7.4160638 51.4851286,7.416073 51.4851688,7.4163704 51.4852679,7.4164943 51.4851489,7.4162344 51.4850726,7.4160137 51.4851038,7.4159984 51.485106) | Wilhelm-Dilthey-Straße

This is my TextSymbolizer:

<TextSymbolizer wrap-width="10" size="11" fill="blue" placement="line" face-name="DejaVu Sans Book" halo-radius="1" max-char-angle-delta="5">[name]</TextSymbolizer>
@talaj

This comment has been minimized.

Copy link
Member

commented Oct 27, 2015

@springmeyer, I thought this is known issue: #2952

I'm not using #2953 in downstream because of this.

@tobwen

This comment has been minimized.

Copy link
Author

commented Oct 28, 2015

@talaj Oh yeah, looks like it. I hope, Mapnik 3 isn't a step back, like OpenLayers 3 or WinAMP 3 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.