...
|
...
|
@@ -39,6 +39,7 @@ |
|
|
sublayers = [[NSMutableArray alloc] init];
|
|
|
mapContents = _contents;
|
|
|
self.masksToBounds = YES;
|
|
|
rotationTransform = CGAffineTransformIdentity;
|
|
|
return self;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -61,6 +62,9 @@ |
|
|
RMProjectedPoint location = [layer_with_proto projectedLocation];
|
|
|
layer_with_proto.position = [[mapContents mercatorToScreenProjection] projectXYPoint:location];
|
|
|
}
|
|
|
if(!layer_with_proto.enableRotation){
|
|
|
[layer_with_proto setAffineTransform:rotationTransform];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -188,4 +192,18 @@ |
|
|
return [sublayers containsObject:layer];
|
|
|
}
|
|
|
|
|
|
- (void) setRotationOfAllSublayers:(float) angle
|
|
|
{
|
|
|
rotationTransform = CGAffineTransformMakeRotation(angle); // store rotation transform for subsequent layers
|
|
|
@synchronized(sublayers) {
|
|
|
for (id layer in sublayers)
|
|
|
{
|
|
|
CALayer<RMMovingMapLayer>* layer_with_proto = (CALayer<RMMovingMapLayer>*)layer;
|
|
|
if(!layer_with_proto.enableRotation){
|
|
|
[layer_with_proto setAffineTransform:rotationTransform];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@end |
...
|
...
|
|