IOS で mapkit を使用してマップ上にユーザーを表示する方法。このコードは、定義された座標ではなく、マップ上にインドのみを表示します。
mapView.delegate = self;
mapView.showsUserLocation = YES;
objLocationManager = [[CLLocationManager alloc] init];
objLocationManager.distanceFilter = kCLDistanceFilterNone;
objLocationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters;
objLocationManager.delegate = self;
#ifdef __IPHONE_8_0
if(IS_OS_8_OR_LATER) {
// Use one or the other, not both. Depending on what you put in info.plist
//[objLocationManager requestWhenInUseAuthorization];
[objLocationManager requestAlwaysAuthorization];
}
#endif
[objLocationManager startUpdatingLocation];
mapView.showsUserLocation = YES;
[mapView setMapType:MKMapTypeStandard];
[mapView setZoomEnabled:YES];
[mapView setScrollEnabled:YES];
mapView.delegate=self;