设置CLLocationCoordinate2Dcoor 个数不定的数组

    NSIntegercountIndex = array.count;

    CLLocationCoordinate2Dcoor[countIndex];

    for(NSIntegeri =0;i

        NSDictionary*dict = array[i];

        coor[i].latitude= [dict[@"latitude"]floatValue];

        coor[i].longitude= [dict[@"longitude"]floatValue];

        mapView.centerCoordinate= coor[i];

    }

    BMKPolyline*polyline = [BMKPolylinepolylineWithCoordinates:coorcount:countIndex];

    [mapViewaddOverlay:polyline];

//    free(coor);

你可能感兴趣的:(设置CLLocationCoordinate2Dcoor 个数不定的数组)