Commit 0831a24c authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent 43e5ab3e
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
@property (nonatomic, strong) GMSMapView * mapView; @property (nonatomic, strong) GMSMapView * GGMapView;
@property (nonatomic, strong) GMSCircle * selfCircle; @property (nonatomic, strong) GMSCircle * selfCircle;
@property (nonatomic, strong) GMSMarker * selfMarker; @property (nonatomic, strong) GMSMarker * selfMarker;
@property (nonatomic, assign) float __block zoom; @property (nonatomic, assign) float __block zoom;
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(model.latitude, model.longitude); CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(model.latitude, model.longitude);
if (self.refershMyself) { if (self.refershMyself) {
self.mapView.camera = [GMSCameraPosition cameraWithTarget:coord zoom:self.zoom]; self.GGMapView.camera = [GMSCameraPosition cameraWithTarget:coord zoom:self.zoom];
self.refershMyself = NO; self.refershMyself = NO;
} }
...@@ -184,15 +184,15 @@ ...@@ -184,15 +184,15 @@
///初始化地图 ///初始化地图
// self.mapView = [[MAMapView alloc] initWithFrame:self.view.bounds]; // self.mapView = [[MAMapView alloc] initWithFrame:self.view.bounds];
self.mapView = [GMSMapView mapWithFrame:self.view.bounds camera:camera]; self.GGMapView = [GMSMapView mapWithFrame:self.view.bounds camera:camera];
_mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; _GGMapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
///把地图添加至view ///把地图添加至view
[self.view addSubview: _mapView]; [self.view addSubview: _GGMapView];
///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码 ///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码
// _mapView.showsUserLocation = false; // _mapView.showsUserLocation = false;
_mapView.delegate = self; _GGMapView.delegate = self;
// _mapView.zoomLevel = 14; // _mapView.zoomLevel = 14;
// _mapView.showsScale = false; // _mapView.showsScale = false;
// _mapView.showsCompass = false; // _mapView.showsCompass = false;
...@@ -241,15 +241,15 @@ ...@@ -241,15 +241,15 @@
_selfMarker.title = @"Me"; _selfMarker.title = @"Me";
_selfMarker.snippet = @"WTF"; _selfMarker.snippet = @"WTF";
_selfMarker.infoWindowAnchor = CGPointMake(0.5, 0.25); _selfMarker.infoWindowAnchor = CGPointMake(0.5, 0.25);
_selfMarker.map = _mapView; _selfMarker.map = _GGMapView;
CLLocationDistance distance = 100; CLLocationDistance distance = 100;
self.selfCircle.map = nil; _selfCircle.map = nil;
self.selfCircle = [GMSCircle circleWithPosition:position radius:distance]; _selfCircle = [GMSCircle circleWithPosition:position radius:distance];
self.selfCircle.fillColor = [kColorWithRGBA(86, 142, 252, 0.15) colorWithAlphaComponent:0.5]; _selfCircle.fillColor = [kColorWithRGBA(86, 142, 252, 0.15) colorWithAlphaComponent:0.5];
self.selfCircle.strokeColor = [kColorWithRGBA(86, 142, 252, 0.6) colorWithAlphaComponent:0.5]; _selfCircle.strokeColor = [kColorWithRGBA(86, 142, 252, 0.6) colorWithAlphaComponent:0.5];
self.selfCircle.strokeWidth = 1.0; _selfCircle.strokeWidth = 1.0;
self.selfCircle.map = self.mapView; _selfCircle.map = _GGMapView;
}else{ }else{
CLLocationCoordinate2D position = point; CLLocationCoordinate2D position = point;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment