mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Take markers into account when performing symbol placement

Open brncsk opened this issue 8 months ago • 0 comments

Motivation

I just had a look at Apple's MapKit JS that seems to do this:

  1. Go to https://developer.apple.com/maps/web/
  2. Find the "Draggable Annotations" example at the bottom of the page
  3. Force-click then drag the red marker to move it
  4. Observe colliding labels disappear at the marker's new location.

This probably involves measuring the extent of the marker's container element and using it as an "exclusion zone" when performing symbol placement.

brncsk avatar Jun 14 '24 06:06 brncsk