Constrain user dot to superview margins

When the screen changes orientation, the user dot should always appear at the correct location.

Fixed #1313.
This commit is contained in:
Minh Nguyễn
2015-04-21 15:58:55 -07:00
parent 3ddd65cb0e
commit 87409b1234

View File

@@ -1701,6 +1701,8 @@ CLLocationCoordinate2D latLngToCoordinate(mbgl::LatLng latLng)
}
self.userLocationAnnotationView = [[MGLUserLocationAnnotationView alloc] initInMapView:self];
self.userLocationAnnotationView.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin |
UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin);
self.locationManager = [CLLocationManager new];