百度地图 怎样 添加 多个大头针?
有五个 经纬度坐标点 怎样 在地图上添加五个大头针 来 标注这五个点????

解决方案 »

  1.   

           for (int i = 0; i < 5; i++){
             
                    BMKPointAnnotation *item = [[BMKPointAnnotation alloc]init];
                    CLLocationCoordinate2D coords = CLLocationCoordinate2DMake([poi.location[1] floatValue],[poi.location[0] floatValue]);//纬度,经度
                    item.coordinate = coords;
                    item.title = poi.gname;
                    [_mapView addAnnotation:item]; //添加大头针(每添加一次会调用 - (BMKAnnotationView *)mapView:(BMKMapView *)view viewForAnnotation:(id <BMKAnnotation>)annotation 这个方法) 
                }
      

  2.   

    [poi.location[1] floatValue]是什么