Question

i'm working on a app using the route-me project. I'd like to have a mapView rotating to fit with the current heading. I kwow that the issue has already been dealt with. Therefore, when is use

[self.mapView.contents setRotation:desiredAngle];

or

[self.mapView setTransform:CGAffineTransformMakeRotation(desiredAngle)];

on a RMMapview i put on the detailViewController of a SplitViewController, i get a weird behavior. it's the view that rotates and not the map contained in it. Graphically it means that the square containing the map rotates and we can see white area where the square's corners were formerly. Can someone help me solve this issue or explain me what i didn't get right in the first place. Thanks

Was it helpful?

Solution

Apparently setting the mapView's width and heigth equal to the diagonal of the containing View solves this issue. To understand why we just have to think about the view behavior and figure out that the white areas that appear wouldn't if we took a bigger square for the view's frame. To sum up, your mapView must be big enough to hide its (actual) corners from the user's sight. Not really a solution, more a workaround but it's enough for me. Hope it helps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top