• 设置 百度地图 的显示的地图中心 和缩放级别


    - (void)viewDidLoad {
        NSLog(@"进入GRailwayController.m的viewDidLoad方法");
        [super viewDidLoad];
    
        zoomLevel = 3.0f;//启动BMKMapManager
        bmkMapManager = [[BMKMapManager alloc]init];
        BOOL ret = [bmkMapManager start:@"2772BD5CAFF652491F65707D6D5E9ABEBF3639CC" generalDelegate:self];
        if (!ret) {
            NSLog(@"manager start faile d!");
        }
        
        //创建一张百度地图
        _mapView = [[BMKMapView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
        _mapView.delegate = self;
        [webView addSubview:_mapView];
        
        mapCenterLat = 35.91039f;
        mapCenterLon = 116.89017f;
        [self setMapCenter];
    //初始化自定义的气泡view
        bubbleView = [[KYBubbleView alloc] initWithFrame:CGRectMake(0, 0, 160, 40)];
        bubbleView.hidden = YES;
        
        dataArray = [[NSMutableArray alloc] initWithCapacity:10];
    }
    -(void)setMapCenter //设置地图的中心位置 { mapCenterCoordinate.latitude = mapCenterLat; mapCenterCoordinate.longitude = mapCenterLon; [_mapView setRegion:BMKCoordinateRegionMake(mapCenterCoordinate,BMKCoordinateSpanMake(zoomLevel,zoomLevel))]; NSLog(@"=========%f,%f,%f",mapCenterLat,mapCenterLon,zoomLevel); }
  • 相关阅读:
    功能测试点总结
    SQL 注入
    软件特征功能测试过程分析 (引用)
    高效率测试之巧用策略模式 (引用)
    Oracle数据库安装过程中遇到的若干问题
    涉众利益分析
    问题账户需求分析
    2018春阅读计划
    《我们应当怎样做需求分析》阅读笔记
    个人总结
  • 原文地址:https://www.cnblogs.com/ygm900/p/3092642.html
Copyright © 2020-2023  润新知