- BMKMapView *mapView=[[BMKMapView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
- [_mapView setZoomEnabled:YES];
- [_mapView setZoomLevel:10];//级别,3-19
- mapView.showMapScaleBar = YES;//比例尺
- mapView.mapScaleBarPosition = CGPointMake(10,mapView.frame.size.height-45);//比例尺的位置
- mapView.showsUserLocation=YES;//显示当前设备的位置
- mapView.userTrackingMode = BMKUserTrackingModeFollow;//定位跟随模式
- [mapView setMapType:BMKMapTypeStandard];//地图的样式(标准地图)
- mapView.delegate = self;
- _mapView = mapView;
- [self.view addSubview:_mapView];
annotationView.calloutOffset = CGPointMake(30, 0);
进去看看///关联的annotation
@property (nonatomic, strong) id <BMKAnnotation> annotation;
///annotation view显示的图像
@property (nonatomic, strong) UIImage *image;
///默认情况下, annotation view的中心位于annotation的坐标位置,可以设置centerOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是像素
@property (nonatomic) CGPoint centerOffset;
///默认情况下, 弹出的气泡位于view正中上方,可以设置calloutOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是像素
@property (nonatomic) CGPoint calloutOffset;