Bug report #11883
text annotation with fixed map position moves
|Affected QGIS version:||2.6.1||Regression?:||No|
|Operating System:||Windows||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||20097|
When adding a text annotation and using the setting "fixed map position", QGIS rounds or truncates the map position when saving the project file. When loading the project file again, the position is displayed correctly at first, presumably beacause QGIS uses the saved canvas position instead of the map position. When zooming the map, the canvas position seems to be recalculated from the saved map position. Because of the rounding/truncation, this causes the text annotation to move to the corresponding rounded coordinate value.
This does not occur when changing the map scale in the map canvas element settings in the map composer, only when zooming in the main application map window.
Example from project file:
<AnnotationItem frameHeight="35" canvasPosX="686" mapPosX="3.2347e+07" canvasPosY="458.375" mapPositionFixed="1" mapPosY="5.67418e+06" [..]
For mapPosX this means an easting value of 32347000m, so the position of the label may be off by almost 100 meters in the worst case (if the values are truncated) or 50 meters (if the values are rounded).
This is really a problem when creating large-scale maps.
Screenshots with coordinates and an example project are attached.