Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: rotation #9

Open
tveinot opened this issue Jul 20, 2017 · 1 comment
Open

Feature Request: rotation #9

tveinot opened this issue Jul 20, 2017 · 1 comment

Comments

@tveinot
Copy link

tveinot commented Jul 20, 2017

Wondering if rotation could be added to the GUI? Not sure if this is the right spot to put a feature request but it is where someone else did on another package.

@pka pka changed the title Feature Request Feature Request: rotation Sep 13, 2017
@tveinot
Copy link
Author

tveinot commented Jan 16, 2020

I did do some work on this and made a little breakthrough, in order to get the Canvas to rotate with the map all you need to do is create a function for the Expression String Editor using python and then use that custom function in the data driven overide for the Map Rotation in the Map Layout Properties of the desired layout.

Function Code:
from qgis.core import *
from qgis.gui import *
from qgis.utils import iface

@qgsfunction(args='auto', group='Custom')
def CanvasRotation(feature, parent):
return (iface.mapCanvas().rotation())

However rotating the map causes some minor issues when moving the Map View Box and in how the Map View Box looks in your Canvas. I think a solution lies in using QgsTransform on the def __createRubberBand(self): and the def canvasMoveEvent(self, e): I have not had any success yet but if I do I will post it here.
Thanks again for the tool!
Tyler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants