TransWikia.com

Is it possible to sum labels that are colliding in MapboxGL?

Geographic Information Systems Asked by user85973 on May 31, 2021

I have a set of vector data with monetary values. With the default MapboxGL label behavior, some labels are displaced ‘behind’ others and set to hidden, dependent on the camera angle.

I would like to be able to aggregate the labels that are displaced, and add their values to the label that is displacing them. Is this possible?

A sloppy alternative would be to generate combinations of vectors beforehand and serve them based on the tile layer, since I’m using Mapbox Vector Tiles served locally. Unfortunately that wouldn’t really account for viewport angles, and would only minimize the issue rather than solve it.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP