Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rotation fix from CmputrAce:touch_enhancements

  • Loading branch information...
commit 9abe3a27b0d096e4054747de2d4bca42448cae74 1 parent 982647a
@tracyharton tracyharton authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 MapView/Map/RMMarkerManager.m
View
11 MapView/Map/RMMarkerManager.m
@@ -58,7 +58,13 @@ - (void)dealloc
/// place the (new created) marker onto the map at projected point and take ownership of it
- (void)addMarker:(RMMarker *)marker atProjectedPoint:(RMProjectedPoint)projectedPoint {
+
+ // only set the AffineTransform if the marker has rotation enabled
+ if (marker.enableRotation) {
[marker setAffineTransform:rotationTransform];
+ } else {
+ [marker setAffineTransform:CGAffineTransformMakeRotation(0.0f)];
+ }
[marker setProjectedLocation:projectedPoint];
[marker setPosition:[[contents mercatorToScreenProjection] projectXYPoint:projectedPoint]];
[[contents overlay] addSublayer:marker];
@@ -187,7 +193,12 @@ - (void)setRotation:(float)angle
for (RMMarker *marker in [self markers])
{
+ // only apply rotation if the marker has it enabled
+ if (marker.enableRotation) {
[marker setAffineTransform:rotationTransform];
+ } else {
+ [marker setAffineTransform:CGAffineTransformMakeRotation(0.0f)];
+ }
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.