Skip to content

Buffer

WARNING

Conflicts can occur when using buffers simultaneously with measurement tools (like drawing or distance measuring), preventing buffer manipulation. The following recommendations are provided:

  1. MapboxDraw or distance measuring tools should only be initialized when the user explicitly clicks on a measurement-related function. They should not be initialized beforehand.
  2. Listen for the mouseenter and mouseleave events of the buffer. On mouseenter, set the measurement mode to static. On mouseleave, set the mode to non-static.

TIP

Polygon and line buffers support manual drawing on the map.

TIP

Circular buffers support drag functionality on mobile devices.