Skip to content

Use polylabel for tag component polygon labels #216

@oscarlorentzon

Description

@oscarlorentzon

Currently it is only possible to set the vertex index for labels on both polygons and rectangles. For polygons it makes much more sense to put the label or icon in a representative point or visual center inside the polygon than at a vertex.

This can be implemented with the help of https://github.com/mapbox/polylabel.

  • Add support for configuring the outline tag with a visual center label / icon.
  • Use polylabel to determine the visual center.
  • Render the label / icon at the visual center.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions