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 label placement #582

Open
jansule opened this issue Sep 6, 2023 · 3 comments
Open

TextSymbolizer label placement #582

jansule opened this issue Sep 6, 2023 · 3 comments

Comments

@jansule
Copy link
Contributor

jansule commented Sep 6, 2023

Feature Request

Is your feature request related to a problem? Please describe.

The TextSymbolizer does currently not support a property for setting the label placement. Due to this, we are currently not able to make the labels of a line (e.g. a street) follow the line.

Describe the solution you'd like

We should add a property (e.g. labelPlacement) that handles this.

In mapbox this property is called symbol-placement (see https://docs.mapbox.com/style-spec/reference/layers/#layout-symbol-symbol-placement).

In OpenLayer this property is called placement (see https://openlayers.org/en/v7.5.2/apidoc/module-ol_style_Text.html#~TextPlacement).

Describe alternatives you've considered

None

Additional context

Style using different placements due to lack of support:

image

@KaiVolland
Copy link
Contributor

It currently also extends the BasePointSymbolizer which is incorrect as it won't fit the needs for line string labeling. The TextSymbolizer already contains line based properties like maxAngle so i guess its no problem to move the matching properties from the BasePointSymbolizer to the TextSymbolizer and add the placement property.

@jansule
Copy link
Contributor Author

jansule commented Nov 9, 2023

Partially solved by #584

@KaiVolland
Copy link
Contributor

The TextSymbolizer still extends BasePointSymbolizer which is not correct. This should be fixed as described here:

It currently also extends the BasePointSymbolizer which is incorrect as it won't fit the needs for line string labeling. The TextSymbolizer already contains line based properties like maxAngle so i guess its no problem to move the matching properties from the BasePointSymbolizer to the TextSymbolizer and add the placement property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Todo
Development

No branches or pull requests

2 participants