app/pb_kits/playbook/pb_map/docs/_map_with_plugin

Various plugins are available for use with MapLibre, one of which is the mapbox-gl-draw. This plugin is recommended by MapLibre if you need to add the functionality of drawing polygons on the map.

To test this tool:

  • Click the “draw box” icon to activate the polygon tool
  • Click on a spot on the map to start drawing
  • Continue clicking to create new points, defining the boundaries of the polygon
  • Press enter or re-click the first point to finish the polygon
  • Once drawn, polygons can be selected on click and then moved, by dragging-and-dropping the entire shape; resized, by dragging-and-dropping any boundary point(s); or deleted, by clicking the “trash” button.