iOS高德地图SDK(3D) V11.2.0001

Instance Methods | Properties | List of all members
MAMapView(UserLocation) Category Reference

`#import <MAMapView.h>`

## Instance Methods
(void) | - setUserTrackingMode:animated:
| 设置定位用户位置的模式 Set the mode for locating the user's position More...
(void) | - updateUserLocationRepresentation:
| 设定UserLocationView样式。如果用户自定义了userlocation的annotationView，或者该annotationView还未添加到地图上，此方法将不起作用 Set the style of UserLocationView. If the user has customized the annotationView for userlocation, or if the annotationView has not been added to the map yet, this method will not work. More...

## Properties
BOOL | showsUserLocation
MAUserLocation * | userLocation
BOOL | customizeUserLocationAccuracyCircleRepresentation
MACircle * | userLocationAccuracyCircle
MAUserTrackingMode | userTrackingMode
BOOL | userLocationVisible
CLLocationDistance | distanceFilter
CLLocationAccuracy | desiredAccuracy
CLLocationDegrees | headingFilter
BOOL | pausesLocationUpdatesAutomatically
BOOL | allowsBackgroundLocationUpdates

## Method Documentation

## ◆ setUserTrackingMode:animated:

- (void) setUserTrackingMode: |  | (MAUserTrackingMode) | mode
animated: |  | (BOOL) | animated

设置定位用户位置的模式 Set the mode for locating the user's position

Parameters

  mode | 要设置的模式 the mode to be set
  animated | 是否动画设置 whether to animate the setting

Extends class MAMapView.

## ◆ updateUserLocationRepresentation:

- (void) updateUserLocationRepresentation: |  | (MAUserLocationRepresentation *) | representation |

设定UserLocationView样式。如果用户自定义了userlocation的annotationView，或者该annotationView还未添加到地图上，此方法将不起作用 Set the style of UserLocationView. If the user has customized the annotationView for userlocation, or if the annotationView has not been added to the map yet, this method will not work.

Parameters

  representation | 样式信息对象 the style information object

Extends class MAMapView.

## Property Documentation

## ◆ allowsBackgroundLocationUpdates

- (BOOL) allowsBackgroundLocationUpdates
| read write nonatomic assign

是否允许后台定位。默认为NO。只在iOS 9.0之后起作用。
设置为YES的时候必须保证 Background Modes 中的 Location updates处于选中状态，否则会抛出异常。
注意：定位必须在停止的状态下设置（showsUserLocation = NO），否则无效 Whether to allow background location. Default is NO. Only works after iOS 9.0.
When set to YES, you must ensure that Location updates in Background Modes is selected, otherwise an exception will be thrown.
Note: The location must be set in a stopped state (showsUserLocation = NO), otherwise it will be invalid.

Extends class MAMapView.

## ◆ customizeUserLocationAccuracyCircleRepresentation

- (BOOL) customizeUserLocationAccuracyCircleRepresentation
| read write nonatomic assign

是否自定义用户位置精度圈(userLocationAccuracyCircle)对应的 view, 默认为 NO.
如果为YES: 会调用 - (MAOverlayRenderer *)mapView (MAMapView *)mapView rendererForOverlay:(id <MAOverlay>)overlay 若返回nil, 则不加载.
如果为NO : 会使用默认的样式. Whether to customize the view corresponding to the user location accuracy circle (userLocationAccuracyCircle), default is NO.
If YES: it will call - (MAOverlayRenderer *)mapView (MAMapView *)mapView rendererForOverlay:(id <MAOverlay>)overlay, if it returns nil, it will not be loaded.
If NO: the default style will be used.

Extends class MAMapView.

## ◆ desiredAccuracy

- (CLLocationAccuracy) desiredAccuracy
| read write nonatomic assign

设定定位精度。默认为kCLLocationAccuracyBest Set the positioning accuracy. The default is kCLLocationAccuracyBest

Extends class MAMapView.

## ◆ distanceFilter

- (CLLocationDistance) distanceFilter
| read write nonatomic assign

设定定位的最小更新距离。默认为kCLDistanceFilterNone，会提示任何移动 Set the minimum update distance for positioning. The default is kCLDistanceFilterNone, which will prompt any movement

Extends class MAMapView.

## ◆ headingFilter

- (CLLocationDegrees) headingFilter
| read write nonatomic assign

设定最小更新角度。默认为1度，设定为kCLHeadingFilterNone会提示任何角度改变 Set the minimum update angle. The default is 1 degree, setting it to kCLHeadingFilterNone will prompt any angle change.

Extends class MAMapView.

## ◆ pausesLocationUpdatesAutomatically

- (BOOL) pausesLocationUpdatesAutomatically
| read write nonatomic assign

指定定位是否会被系统自动暂停 Whether the specified positioning will be automatically paused by the system

Extends class MAMapView.

## ◆ showsUserLocation

- (BOOL) showsUserLocation
| read write nonatomic assign

是否显示用户位置 Whether to display user location

Extends class MAMapView.

## ◆ userLocation

- (MAUserLocation*) userLocation
| read nonatomic assign

当前的位置数据 Current location data

Extends class MAMapView.

## ◆ userLocationAccuracyCircle

- (MACircle*) userLocationAccuracyCircle
| read nonatomic assign

用户位置精度圈 对应的overlay Overlay corresponding to user location accuracy circle

Extends class MAMapView.

## ◆ userLocationVisible

- (BOOL) userLocationVisible
| read nonatomic assign

当前位置在地图中是否可见 Whether the current location is visible on the map

Extends class MAMapView.

## ◆ userTrackingMode

- (MAUserTrackingMode) userTrackingMode
| read write nonatomic assign

定位用户位置的模式, 注意：在follow模式下，设置地图中心点、设置可见区域、滑动手势、选择annotation操作会取消follow模式，并触发 - (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated; User location tracking mode, Note: In follow mode, setting the map center point, setting the visible region, swipe gestures, or selecting an annotation will cancel follow mode and trigger - (void)mapView:(MAMapView *)mapView didChangeUserTrackingMode:(MAUserTrackingMode)mode animated:(BOOL)animated;

Extends class MAMapView.

The documentation for this category was generated from the following file:

- MAMapView.h

© 2017 高德信息技术有限公司 版权所有，保留所有权利。