Skip to content

Hope to add support for rendering text with a background. #6382

@chenhaijia

Description

@chenhaijia
Image

Requirement: I want to render massive amounts of text with background colors, similar to the effect shown in the image above.
Current approach: I'm following the method described at https://maplibre.org/maplibre-gl-js/docs/examples/add-a-stretchable-image-to-the-map/ to render it.

Image

Problem: The text overlaps. It seems there isn’t a better way to achieve this effect with the approach I have in mind.
The result I’m aiming for is shown in the link below.
https://lbs.amap.com/demo/javascript-api-v2/example/mass-markers/labelmarker-text
OpenLayers already offers a similar capability: when rendering a point, it can simultaneously draw text with either a solid color or an image background. It would be extremely helpful if MapLibre could add equivalent support; this is a fairly common request in the community, and we would greatly appreciate your consideration. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions