ios - MapViewController displays view for current location always -


After the

I have written the code given below for example:

but I'm always on my current location Directed for. ? How can I solve this problem

  MapViewController * MVC = [[MapViewController alloc] initWithNibName: @ "MapViewController" bundle: zero]; CLLocationCoordinate2D AnnotationCoulder; Annotation code.latitude = 47.640071; Annotation code. Long = 122.129598; Mckpoint Annotations * Annotation Point = [[Mk Point Annotation Elok] IIT]; Annotationpoint.cordinate = annotationcorder; Annotation Point.title = @ "Microsoft"; Annotationpoint subtitle = @ "Microsoft's headquarters"; [Mvc.mapView addNnotation: annotationPoint];   

Note:

MapViewcontroller.h

  @interface MapViewController: UIViewController & LT; MKMapViewDelegate & gt; @ Property (Weak, Nonomatic) IBot MKMapView * mapView; @implementation MapViewController - (ID) initWithNibName: (NSString *) nibNameOrNil bundle: (NSBundle *) nibBundleOrNil {auto = [Super initWithNibName: nibNameOrNil bundle: nibBundleOrNil]; If (self) {// custom initialization} back itself; } - (zero) viewDidoadload [[Super Viewedload]; // Setup an additional after loading the view from your nibb Self.mapView.delegate = self; Self.mapView.mapType = MKMapTypeStandard; Self.mapView.showsUserLocation = Yes; }    

Try it under your code

  MKCoordinateRegion adjustedRegion = [MapView regionThatFits: MKCoordinateRegionMakeWithDistance (annotationCoord, 200, 200)]; [MapView Set Region: Adjusted Animated Animation: Yes];   

Help may be completed .. Cheers ...

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -