You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested, and the transformed points from toCanvasCoordinates method are calculated correctly (ie. i center the position marker in the middle of map canvas, and i get the same resulting point, regardless whether the map is rotated or not) When i update map canvas like this:
self.map.setRotation(r)
self.marker.update_position(x, y, r)
self.map.setExtent(myextents)
self.map.refresh()
Position of the marker is correct only if map rotation is zero, otherwise not, even though the point returned from toCanvasCoordinates is always correct.Error persists if i reverse the order of setRotation and marker.update_position calls.
Related issue(s): #20120 (duplicates)
Redmine related issue(s): 11910
The text was updated successfully, but these errors were encountered:
Author Name: Uros Bernik (Uros Bernik)
Original Redmine Issue: 12601
Affected QGIS version: 2.8.1
Here is the code of my custom QgsMapCanvasItem:
class QgsPositionMarker(QgsMapCanvasItem):
Graphic = QPolygon([QPoint(-20, 0), QPoint(20, 15), QPoint(10, 0), QPoint(20, -15)])
I tested, and the transformed points from toCanvasCoordinates method are calculated correctly (ie. i center the position marker in the middle of map canvas, and i get the same resulting point, regardless whether the map is rotated or not) When i update map canvas like this:
Position of the marker is correct only if map rotation is zero, otherwise not, even though the point returned from toCanvasCoordinates is always correct.Error persists if i reverse the order of setRotation and marker.update_position calls.
Related issue(s): #20120 (duplicates)
Redmine related issue(s): 11910
The text was updated successfully, but these errors were encountered: