← API Reference
@mapgpu/tools
Interactive drawing and measurement tools.
npm install @mapgpu/tools Exports
class
ToolManager Tool lifecycle manager. Creates an overlay div for event interception, manages tool activation/deactivation, undo/redo command system.
class
DrawPointTool Point placement tool. Click to place a point feature.
class
DrawPolylineTool Polyline drawing tool. Click to add vertices, double-click to finish.
class
DrawPolygonTool Polygon drawing tool. Click to add vertices, double-click to close and finish.
class
EditTool Vertex editing tool. Move, delete, and insert vertices on existing features.
class
SnapEngine Vertex/edge snapping engine with configurable tolerance. Snaps drawing tools to nearby features.
class
MeasurePointTool Point coordinate measurement tool.
class
MeasureLineTool Geodesic distance measurement using Haversine formula.
class
MeasureAreaTool Spherical area measurement tool.