用户登录
用户注册

分享至

#iOS全英文地图# 混搭mapkid+SDK, 开发全英文地图

  • 作者: 羞耻play
  • 来源: 51数据库
  • 2022-08-17
  //申请定位权限- (void) initLocation
{
    if(nil ==_locationManager)
    {
       _locationManager = [[CLLocationManager alloc] init];
   
    }
   
    if([[[UIDevicecurrentDevice] systemVersion] floatValue] >= 8.0)
    {
       [_locationManager requestAlwaysAuthorization];
    }
}
 
//初始化MapView
- (void) initMapView{
   
    //构造MKMapView
    _mapView =[[MKMapView alloc] initWithFrame:CGRectMake(0, 21,CGRectGetWidth(self.view.bounds), CGRectGetHeight(self.view.bounds))];
    _mapView.delegate= self;
   
    _mapView.showsUserLocation= YES;//显示定位图标
   
    [_mapViewsetUserTrackingMode:MKUserTrackingModeFollow];//设置定位模式
   
    //将mapview添加到Subview中
    [self.viewaddSubview:_mapView];
 
}
软件
前端设计
程序设计
Java相关