Closed ghost closed 2 years ago
There's not a built-in method to do this, but I think it should be pretty easy to add.
MapGraphicsView has a QGraphicsView: https://github.com/raptorswing/MapGraphics/blob/5abf53449707985ef4754f9cc172fa99ea6c70fe/MapGraphics/MapGraphicsView.h#L97
QGraphicsView has methods for rotation or setting a transformation matrix.
If you add a method to MapGraphicsView that exposes that underlying functionality I think it will work.
Feel free to send a PR if you get something nice working :) I don't have a dev environment setup for this project at the moment so it's hard for me to work on it.
See 0cf9af2104f545b3ec279772ef582feae304c4d1
🥳
It's rotate map and text, but i want rotate map, but text is static
Yes, the text is "baked into" the tiles. The tiles are just images pulled from OpenStreetMap and the orientation is set in stone when the tile is rendered.
To make the text always stay right-side-up the tiles would have to be rendered dynamically within the application. This would take a decent amount of work but is possible. One way would be to write a new tile source (implement the interface defined by MapTileSource) that renders tiles within the application. MapTileSource's interface would need to be modified to take rotation as an input for rendering.
Another option would be to render tiles with no text and add the text on top as map objects.
I have a program in my repository for this, I just wanted to know if it's possible better
How i can rotate map?