进口烟丝品牌大全分析
这几天朋友联系我,加我分析下进口烟丝品牌大全,我一开始也没啥头绪,后面只好撸起袖子写了,部分数据来源于进口烟丝,代码比较简单,如下:
import "LineViewController.h"
#import <AMapNaviKit/AMapNaviKit.h>
#import <CoreLocation/CoreLocation.h>
#import "TbitBluetooth.h"
#import "KKProgressView.h"
#import "JZLocationConverter.h"
#import "BikeAn.h"
#import "BikeView.h"
#import "DataTool.h"
#import "MAPinView.h"
#import "ParkPinAn.h"
#import "AddParkPolygon.h"
#import "PolygonModel.h"
#import "VerticalLine.h"
#import "AngleView.h"
#import "LocationAn.h"
#import "LocationView.h"
#import "TagAn.h"
#import "TagView.h"
#define RADIANS_TO_DEGREES(radians) ((radians) * (180.0 / M_PI))
#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)
@interface LineViewController ()<MAMapViewDelegate> {
CGFloat _kk;
CGFloat _bb;
CLLocationCoordinate2D _verticalTopCoord;
}
@property (nonatomic, strong)MAMapView *mapView;
@property (nonatomic, strong)CLLocationManager *locationManager;
@property (nonatomic, strong)NSTimer *timer;
@property (nonatomic, strong)UILabel *leftLabel;
@property (nonatomic, strong)AngleView *angleView;
@property (nonatomic, strong)UITextView *textView;
@property (nonatomic, strong)BikeAn *bikeAn;
@property (nonatomic, strong)UIView *toolView;
@property (nonatomic, strong)MAPointAnnotation *pinAnnotation;//大头针标注
@property (nonatomic, strong)MAPinView *pinView;
@property (nonatomic, strong)NSMutableArray *pointArray;
@property (nonatomic, strong)UIImageView *showImageView;
@property (nonatomic, strong)UILabel *label;
@property (nonatomic, strong)TagAn *tagLeft;
@property (nonatomic, strong)TagAn *tagRight;
@property (nonatomic, strong)TagAn *tagTop;
@property (nonatomic, strong)TagAn *tagBottom;
@end
@implementation LineViewController {
CGFloat lo;
CGFloat la;
int32_t course; //航向
NSInteger locaitonType; //是否实时定位
CGFloat gpsDerection; //gps 角度
CGFloat imuDerection; //imu 角度
CGFloat gpSpeed; // gps 速度
CGFloat wheelSpeed; //车辆速度
CLLocationCoordinate2D vTopCoord;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[TbitBluetooth disConnect];
self.view.backgroundColor = [UIColor whiteColor];
self.mapView = [[MAMapView alloc] init];
_mapView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
[self.view addSubview:self.mapView];
self.locationManager = [[CLLocationManager alloc] init];
[self.locationManager requestAlwaysAuthorization];
_mapView.zoomLevel = 22;
_mapView.delegate = self;
_mapView.showsUserLocation = YES;
_mapView.userTrackingMode = MAUserTrackingModeFollow;
self.toolView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 130)];
self.toolView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.toolView];
UIButton *deleteBtn = [[UIButton alloc] initWithFrame:CGRectMake(10, 20, 60, 45)];
deleteBtn.backgroundColor = [UIColor orangeColor];
[deleteBtn setTitle:@"删除点" forState:0];
deleteBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[self.toolView addSubview:deleteBtn];
[deleteBtn addTarget:self action:@selector(deleteAction:) forControlEvents:UIControlEventTouchUpInside];
UIButton *addBtn = [[UIButton alloc] initWithFrame:CGRectMake(75, 20, 60, 45)];
addBtn.backgroundColor = [UIColor orangeColor];
[addBtn setTitle:@"添加点" forState:0];
[self.toolView addSubview:addBtn];
addBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[addBtn addTarget:self action:@selector(addAction:) forControlEvents:UIControlEventTouchUpInside];
UIButton *connectBtn = [[UIButton alloc] initWithFrame:CGRectMake(140, 20, 60, 45)];
connectBtn.backgroundColor = [UIColor orangeColor];
[connectBtn setTitle:@"连接" forState:0];
[self.toolView addSubview:connectBtn];
connectBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[connectBtn addTarget:self action:@selector(connectAction:) forControlEvents:UIControlEventTouchUpInside];
UIButton *disconnectBtn = [[UIButton alloc] initWithFrame:CGRectMake(205, 20, 60, 45)];
disconnectBtn.backgroundColor = [UIColor orangeColor];
[disconnectBtn setTitle:@"断开" forState:0];
[self.toolView addSubview:disconnectBtn];
disconnectBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[disconnectBtn addTarget:self action:@selector(disConnect:) forControlEvents:UIControlEventTouchUpInside];
UIButton *closeBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.view.frame.size.width-55, 20, 60, 45)];
closeBtn.backgroundColor = [UIColor orangeColor];
[closeBtn setTitle:@"返回" forState:0];
[self.toolView addSubview:closeBtn];
closeBtn.titleLabel.font = [UIFont systemFontOfSize:14];
[closeBtn addTarget:self action:@selector(closeAction:) forControlEvents:UIControlEventTouchUpInside];
// UIButton *temUnlock = [[UIButton alloc] initWithFrame:CGRectMake(275, 20, 60, 45)];
// temUnlock.backgroundColor = [UIColor orangeColor];
// [temUnlock setTitle:@"临开" forState:0];
// [self.toolView addSubview:temUnlock];
// temUnlock.titleLabel.font = [UIFont systemFontOfSize:14];
// [temUnlock addTarget:self action:@selector(temunlock) forControlEvents:UIControlEventTouchUpInside];
//
//
// UIButton *temlock = [[UIButton alloc] initWithFrame:CGRectMake(365, 20, 60, 45)];
// temlock.backgroundColor = [UIColor orangeColor];
// [temlock setTitle:@"临关" forState:0];
// [self.toolView addSubview:temlock];
// temlock.titleLabel.font = [UIFont systemFontOfSize:14];
// [temlock addTarget:self action:@selector(temlock) forControlEvents:UIControlEventTouchUpInside];
self.label = [[UILabel alloc] initWithFrame:CGRectMake(10, 75, self.view.frame.size.width-20, 50)];
self.label.backgroundColor = [UIColor redColor];
self.label.numberOfLines = 0;
[self.view addSubview:self.label];
self.pointArray = [[NSMutableArray alloc] init];
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// _pinAnnotation = [[ParkPinAn alloc] init];
// _pinAnnotation.coordinate = self.mapView.centerCoordinate;
// self.pointArray = [[NSMutableArray alloc] init];
// [_mapView addAnnotation:_pinAnnotation];
// });
self.showImageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.view.frame.size.width/2-10,
self.view.frame.size.height/2-35, 20, 35)];
self.showImageView.image = [UIImage imageNamed:@"ic_search_center"];
[self.view addSubview:self.showImageView];
//先注释下
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(dataAction:) name:@"data" object:nil];
self.bikeAn = [[BikeAn alloc] init];
[_mapView addAnnotation:self.bikeAn];
self.mapView.rotateEnabled = NO;
self.mapView.rotateCameraEnabled = NO;
}
