Commit c7f26015 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

track gmsmap mamap

parent c4c6f713
No preview for this file type
......@@ -39,7 +39,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
allowLocationSimulation = "NO">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
......@@ -51,7 +51,7 @@
</BuildableReference>
</BuildableProductRunnable>
<LocationScenarioReference
identifier = "Hong Kong, China"
identifier = "London, England"
referenceType = "1">
</LocationScenarioReference>
</LaunchAction>
......
......@@ -6,11 +6,11 @@
// Copyright © 2020 Company. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "BaseViewController.h"
#import "ZJFriendModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZJFriendTrackMapViewController : UIViewController
@interface ZJFriendTrackMapViewController : BaseViewController
@property (nonatomic, strong) ZJFriendModel * model;
@property (nonatomic, assign) BOOL autoTrack;
......
......@@ -12,7 +12,7 @@
NS_ASSUME_NONNULL_BEGIN
typedef enum : NSUInteger {
ZJ_GMSMapType,
ZJ_GMSMapType = 1,
ZJ_MAMapType
} ZJMapType;
......
......@@ -134,11 +134,13 @@ static ZJLocationManager * manager;
}else if (error == nil && [placemarks count] == 0) {
NSLog(@"No results were returned.");
[self.data WirteDic:@(ZJ_GMSMapType) Key:@"mapType"];
if (self.callBack) {
self.callBack(nil, nil, ZJ_GMSMapType);
}
} else if (error != nil){
NSLog(@"An error occurred = %@", error);
[self.data WirteDic:@(ZJ_GMSMapType) Key:@"mapType"];
if (self.callBack) {
self.callBack(nil, nil, ZJ_GMSMapType);
}
......@@ -169,6 +171,10 @@ static ZJLocationManager * manager;
isChina = [placemark.ISOcountryCode isEqualToString:@"CN"];
_mapType = isChina ? ZJ_MAMapType : ZJ_GMSMapType;
[self.data WirteDic:@(_mapType) Key:@"mapType"];
[self.data WirteDic:@(coord.latitude) Key:@"latitude"];
[self.data WirteDic:@(coord.longitude) Key:@"longitude"];
if (_callBack) {
_callBack(model, location, _mapType);
}
......
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