Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (geom instanceof OlMultiLinestring) {
geom = geom.getLineStrings()[0];
}
let measureTooltipCoord = geom.getLastCoordinate();
if (measureType === 'polygon') {
output = MeasureUtil.formatArea(geom, map, decimalPlacesInTooltips);
// attach area at interior point
measureTooltipCoord = geom.getInteriorPoint().getCoordinates();
} else if (measureType === 'line') {
output = MeasureUtil.formatLength(geom, map, decimalPlacesInTooltips);
} else if (measureType === 'angle') {
output = MeasureUtil.formatAngle(geom, map, decimalPlacesInTooltips);
}
this._measureTooltipElement.innerHTML = output;
this._measureTooltip.setPosition(measureTooltipCoord);
}
}