Skip to content
Snippets Groups Projects
Commit 5c7cd568 authored by benjamin.jakimow@geo.hu-berlin.de's avatar benjamin.jakimow@geo.hu-berlin.de
Browse files

fixed issue with geographic/projected CRS

parent bbf93125
No related branches found
No related tags found
No related merge requests found
......@@ -203,12 +203,11 @@ class CrosshairMapCanvasItem(QgsMapCanvasItem):
font = painter.font()
ptLabel = QPointF(pt.x(), pt.y() + (ml + font.pointSize() + 3))
distUnit = self.canvas.mapUnits()
distUnit = self.canvas.mapSettings().destinationCrs().mapUnits()
unitString = str(QgsUnitTypes.encodeUnit(distUnit))
if unitString == 'meters':
from timeseriesviewer.utils import scaledUnitString
labelText = scaledUnitString(pred, suffix='m')
else:
labelText = '{}{}'.format(pred, unitString)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment