Function: addSimpleMeasureTool()
function addSimpleMeasureTool(
map: Map,
controlsDiv: HTMLElement,
runtime?: MapMeasureToolRuntime
): void;
Defined in: utils/maps/controls/mapMeasureTool.ts:272
Add a simple point-to-point measurement tool (two clicks) to a Leaflet map. Creates a button in the provided controls container; when activated, the next two clicks on the map will display straight-line distance (meters/km + miles). Subsequent clicks clear the prior measurement and allow a new one.
Parametersβ
mapβ
Leaflet map instance.
controlsDivβ
Container element for map action buttons.
runtime?β
MapMeasureToolRuntime = ...
Returnsβ
void