mapbox-gl-js
mapbox-gl-js copied to clipboard
Take markers into account when performing symbol placement
Motivation
I just had a look at Apple's MapKit JS that seems to do this:
- Go to https://developer.apple.com/maps/web/
- Find the "Draggable Annotations" example at the bottom of the page
- Force-click then drag the red marker to move it
- 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.