ios - MKMapView can't be zoom when its camera heading rotating -


I want to rotate my map view according to iOS device orientation, I apply it as below

  - (zero) location manager: Manager (CLLocationManager *) Updating: (CLHeading *) newHeading {self.userDirection = newHeading.trueHeading; Self.mapView.camera.heading = newHeading.trueHeading; }  

Then I get a problem when the camera of the map view is moving, the map view can not be zoomed.

How can I solve this problem?

I realize that in ICO7 MKMapCamera is a new class, maybe it Is unstable.

Finally, I rotate map views in another way:

First of all, I mapView

  #pragma Icon - Maximize Map View setup - (zero) setupMapView {// Setup size double edge = sqrt (pow (screenSize.size.width, 2) + pow (screenSize.size.height, 2)); Self.mapView = [[MKMapView alloc] initWithFrame: CGRectMake (0, 0, edge lang, edge lang)]; Self.mapView.center = screenCenter; Self.mapView.delegate = self; }  

Next step, apply rotation of map to CLLocationManager rep

  #degineDEGREES_TO_RADIANS (degree) ((degree / 180.0) * (M_PI)). ... - (zero) Location Manager: Manager (CLLocationManager *) Updating: (CLHeading *) newHeading {double radian = DEGREES_TO_RADIANS (newHeading.trueHeading); [Self.mapview settings: cgiapine transcnet mechotation (-Radian)]; }  

Done!


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -