addSimpleMeasureTool
FitFileViewer - API Documentation v30.0.1
FitFileViewer - API Documentation / utils/maps/controls/mapMeasureTool / addSimpleMeasureTool
Function: addSimpleMeasureTool()
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β
Map
Leaflet map instance.
controlsDivβ
HTMLElement
Container element for map action buttons.
runtime?β
MapMeasureToolRuntime = ...
Returnsβ
void