Browse Source

ios location update

jun7572 4 years ago
parent
commit
e35dfbbe6a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      ios/Classes/FlutterAmapView.m

+ 2 - 1
ios/Classes/FlutterAmapView.m

@@ -60,7 +60,7 @@ static NSString* viewType = @"com.i2edu.mapView";
         
         
         ///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码
         ///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码
         _mapView.showsUserLocation = YES;
         _mapView.showsUserLocation = YES;
-        _mapView.userTrackingMode = MAUserTrackingModeFollow;
+        _mapView.userTrackingMode = MAUserTrackingModeFollowWithHeading;
     }
     }
     return self;
     return self;
     
     
@@ -69,6 +69,7 @@ static NSString* viewType = @"com.i2edu.mapView";
 -(MAUserLocationRepresentation*)getRepresentation{
 -(MAUserLocationRepresentation*)getRepresentation{
     MAUserLocationRepresentation *r = [[MAUserLocationRepresentation alloc] init];
     MAUserLocationRepresentation *r = [[MAUserLocationRepresentation alloc] init];
     r.image=[UIImage imageNamed:@"dog"];
     r.image=[UIImage imageNamed:@"dog"];
+    r.showsHeadingIndicator = YES;
       r.image=[self scaleToSize: r.image size:CGSizeMake(50, 60)];
       r.image=[self scaleToSize: r.image size:CGSizeMake(50, 60)];
 //    r.image=[UIImage imageWithContentsOfFile:@"Assets/Images/dog.png"];
 //    r.image=[UIImage imageWithContentsOfFile:@"Assets/Images/dog.png"];
 //    r.locationDotFillColor = [UIColor redColor];
 //    r.locationDotFillColor = [UIColor redColor];