amap_map_fluttify
This commit is contained in:
15
ios/Classes/AmapMapFluttifyPlugin.h
Normal file
15
ios/Classes/AmapMapFluttifyPlugin.h
Normal file
@ -0,0 +1,15 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Flutter/Flutter.h>
|
||||
|
||||
typedef void (^Handler)(NSObject <FlutterPluginRegistrar> *, id, FlutterResult);
|
||||
|
||||
@interface AmapMapFluttifyPlugin : NSObject<FlutterPlugin>
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
82
ios/Classes/AmapMapFluttifyPlugin.m
Normal file
82
ios/Classes/AmapMapFluttifyPlugin.m
Normal file
@ -0,0 +1,82 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
#import <objc/runtime.h>
|
||||
#import "SubHandler/SubHandler0.h"
|
||||
#import "SubHandler/SubHandler1.h"
|
||||
#import "SubHandler/SubHandler2.h"
|
||||
#import "SubHandler/SubHandler3.h"
|
||||
#import "SubHandler/SubHandler4.h"
|
||||
#import "SubHandler/SubHandler5.h"
|
||||
#import "SubHandler/SubHandler6.h"
|
||||
#import "SubHandler/SubHandler7.h"
|
||||
#import "SubHandler/SubHandler8.h"
|
||||
#import "SubHandler/Custom/SubHandlerCustom.h"
|
||||
#import "FluttifyMessageCodec.h"
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
#import "MAPinAnnotationViewFactory.h"
|
||||
#import "MAAnnotationViewFactory.h"
|
||||
#import "MACustomCalloutViewFactory.h"
|
||||
#import "MAMapViewFactory.h"
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation AmapMapFluttifyPlugin {
|
||||
NSMutableDictionary<NSString*, Handler>* _handlerMap;
|
||||
}
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
// 处理方法们
|
||||
_handlerMap = @{}.mutableCopy;
|
||||
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler0]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler1]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler2]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler3]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler4]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler5]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler6]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler7]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandler8]];
|
||||
[_handlerMap addEntriesFromDictionary: [self getSubHandlerCustom]];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (void)registerWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:@"me.yohom/amap_map_fluttify"
|
||||
binaryMessenger:[registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
|
||||
[registrar addMethodCallDelegate:[[AmapMapFluttifyPlugin alloc] initWithFlutterPluginRegistrar:registrar]
|
||||
channel:channel];
|
||||
|
||||
// 注册View
|
||||
[registrar registerViewFactory: [[MAPinAnnotationViewFactory alloc] initWithRegistrar:registrar] withId: @"me.yohom/MAPinAnnotationView"];
|
||||
[registrar registerViewFactory: [[MAAnnotationViewFactory alloc] initWithRegistrar:registrar] withId: @"me.yohom/MAAnnotationView"];
|
||||
[registrar registerViewFactory: [[MACustomCalloutViewFactory alloc] initWithRegistrar:registrar] withId: @"me.yohom/MACustomCalloutView"];
|
||||
[registrar registerViewFactory: [[MAMapViewFactory alloc] initWithRegistrar:registrar] withId: @"me.yohom/MAMapView"];
|
||||
}
|
||||
|
||||
// Method Handlers
|
||||
- (void)handleMethodCall:(FlutterMethodCall *)methodCall result:(FlutterResult)methodResult {
|
||||
if (_handlerMap[methodCall.method] != nil) {
|
||||
_handlerMap[methodCall.method](_registrar, [methodCall arguments], methodResult);
|
||||
} else {
|
||||
methodResult(FlutterMethodNotImplemented);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
21
ios/Classes/Anonymous/MAMapViewDelegate_Anonymous.h
Normal file
21
ios/Classes/Anonymous/MAMapViewDelegate_Anonymous.h
Normal file
@ -0,0 +1,21 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
@protocol FlutterPluginRegistrar;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MAMapViewDelegate_Anonymous : NSObject<MAMapViewDelegate>
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
1107
ios/Classes/Anonymous/MAMapViewDelegate_Anonymous.m
Normal file
1107
ios/Classes/Anonymous/MAMapViewDelegate_Anonymous.m
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
@protocol FlutterPluginRegistrar;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MAMultiPointOverlayRendererDelegate_Anonymous : NSObject<MAMultiPointOverlayRendererDelegate>
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@ -0,0 +1,52 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "MAMultiPointOverlayRendererDelegate_Anonymous.h"
|
||||
#import <Flutter/Flutter.h>
|
||||
#import "FluttifyMessageCodec.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation MAMultiPointOverlayRendererDelegate_Anonymous
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)multiPointOverlayRenderer : (MAMultiPointOverlayRenderer*)renderer didItemTapped: (MAMultiPointItem*)item
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"MAMultiPointOverlayRendererDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MAMultiPointOverlayRendererDelegate::multiPointOverlayRenderer_didItemTapped");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
MAMultiPointOverlayRenderer* argrenderer = renderer;
|
||||
// ref callback arg
|
||||
MAMultiPointItem* argitem = item;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"multiPointOverlayRenderer_didItemTapped" arguments:@{@"renderer": argrenderer == nil ? [NSNull null] : argrenderer, @"item": argitem == nil ? [NSNull null] : argitem}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
21
ios/Classes/Anonymous/MATraceDelegate_Anonymous.h
Normal file
21
ios/Classes/Anonymous/MATraceDelegate_Anonymous.h
Normal file
@ -0,0 +1,21 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
@protocol FlutterPluginRegistrar;
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MATraceDelegate_Anonymous : NSObject<MATraceDelegate>
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
79
ios/Classes/Anonymous/MATraceDelegate_Anonymous.m
Normal file
79
ios/Classes/Anonymous/MATraceDelegate_Anonymous.m
Normal file
@ -0,0 +1,79 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "MATraceDelegate_Anonymous.h"
|
||||
#import <Flutter/Flutter.h>
|
||||
#import "FluttifyMessageCodec.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation MATraceDelegate_Anonymous
|
||||
|
||||
- (instancetype) initWithFlutterPluginRegistrar: (NSObject <FlutterPluginRegistrar> *) registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)traceManager : (MATraceManager*)manager didTrace: (NSArray<CLLocation*>*)locations correct: (NSArray<MATracePoint*>*)tracePoints distance: (double)distance withError: (NSError*)error
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"MATraceDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MATraceDelegate::traceManager_didTrace_correct_distance_withError");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
MATraceManager* argmanager = manager;
|
||||
// ref callback arg
|
||||
NSArray<CLLocation*>* arglocations = locations;
|
||||
// ref callback arg
|
||||
NSArray<MATracePoint*>* argtracePoints = tracePoints;
|
||||
// primitive callback arg
|
||||
NSNumber* argdistance = @(distance);
|
||||
// ref callback arg
|
||||
NSError* argerror = error;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"traceManager_didTrace_correct_distance_withError" arguments:@{@"manager": argmanager == nil ? [NSNull null] : argmanager, @"locations": arglocations == nil ? [NSNull null] : arglocations, @"tracePoints": argtracePoints == nil ? [NSNull null] : argtracePoints, @"distance": argdistance == nil ? [NSNull null] : argdistance, @"error": argerror == nil ? [NSNull null] : argerror}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)mapViewRequireLocationAuth : (CLLocationManager*)locationManager
|
||||
{
|
||||
FlutterMethodChannel *channel = [FlutterMethodChannel
|
||||
methodChannelWithName:[NSString stringWithFormat:@"MATraceDelegate::Callback@%@:%@", NSStringFromClass([self class]), @(self.hash)]
|
||||
binaryMessenger:[_registrar messenger]
|
||||
codec:[FlutterStandardMethodCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]]];
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MATraceDelegate::mapViewRequireLocationAuth");
|
||||
}
|
||||
|
||||
// convert to jsonable arg
|
||||
// ref callback arg
|
||||
CLLocationManager* arglocationManager = locationManager;
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[channel invokeMethod:@"mapViewRequireLocationAuth" arguments:@{@"locationManager": arglocationManager == nil ? [NSNull null] : arglocationManager}];
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
23
ios/Classes/MAAnnotationViewFactory.h
Normal file
23
ios/Classes/MAAnnotationViewFactory.h
Normal file
@ -0,0 +1,23 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
@interface MAAnnotationViewFactory : NSObject <FlutterPlatformViewFactory>
|
||||
|
||||
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
@interface MAAnnotationViewPlatformView : NSObject
|
||||
|
||||
- (instancetype)initWithViewId:(int64_t)viewId frame:(CGRect)frame registrar:(NSObject <FlutterPluginRegistrar> *)registrar arguments:(id _Nullable)args;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
78
ios/Classes/MAAnnotationViewFactory.m
Normal file
78
ios/Classes/MAAnnotationViewFactory.m
Normal file
@ -0,0 +1,78 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "MAAnnotationViewFactory.h"
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
#import <objc/runtime.h>
|
||||
#import "FluttifyMessageCodec.h"
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation MAAnnotationViewFactory {
|
||||
}
|
||||
|
||||
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSObject<FlutterMessageCodec>*)createArgsCodec {
|
||||
return [FlutterStandardMessageCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]];
|
||||
}
|
||||
|
||||
- (NSObject <FlutterPlatformView> *)createWithFrame:(CGRect)frame viewIdentifier:(int64_t)viewId arguments:(id _Nullable)args {
|
||||
return [[MAAnnotationViewPlatformView alloc] initWithViewId:viewId frame: frame registrar:_registrar arguments: args];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MAAnnotationViewPlatformView {
|
||||
int64_t _viewId;
|
||||
CGRect _frame;
|
||||
NSDictionary<NSString *, Handler>* _handlerMap;
|
||||
MAAnnotationView* _view;
|
||||
id _args;
|
||||
}
|
||||
|
||||
- (instancetype)initWithViewId:(int64_t)viewId frame:(CGRect)frame registrar:(NSObject <FlutterPluginRegistrar> *)registrar arguments:(id _Nullable)args {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_viewId = viewId;
|
||||
_registrar = registrar;
|
||||
_frame = frame;
|
||||
_args = args;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (UIView *)view {
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
if (_view == nil) {
|
||||
NSDictionary<NSString*, id>* params = (NSDictionary<NSString*, id>*) _args;
|
||||
|
||||
_view = [[MAAnnotationView alloc] initWithFrame:_frame];
|
||||
|
||||
////////////////////////////////初始化UiKitView////////////////////////////////////////
|
||||
|
||||
////////////////////////////////初始化UiKitView////////////////////////////////////////
|
||||
|
||||
// 这里用一个magic number调整一下id
|
||||
// 同时存放viewId和refId的对象, 供后续viewId转refId使用
|
||||
HEAP[[NSString stringWithFormat:@"%@", @(2147483647 - _viewId)]] = _view;
|
||||
HEAP[[NSString stringWithFormat:@"%@:%@", @"MAAnnotationView", @(_view.hash)]] = _view;
|
||||
}
|
||||
return _view;
|
||||
}
|
||||
|
||||
@end
|
23
ios/Classes/MACustomCalloutViewFactory.h
Normal file
23
ios/Classes/MACustomCalloutViewFactory.h
Normal file
@ -0,0 +1,23 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
@interface MACustomCalloutViewFactory : NSObject <FlutterPlatformViewFactory>
|
||||
|
||||
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
@interface MACustomCalloutViewPlatformView : NSObject
|
||||
|
||||
- (instancetype)initWithViewId:(int64_t)viewId frame:(CGRect)frame registrar:(NSObject <FlutterPluginRegistrar> *)registrar arguments:(id _Nullable)args;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
78
ios/Classes/MACustomCalloutViewFactory.m
Normal file
78
ios/Classes/MACustomCalloutViewFactory.m
Normal file
@ -0,0 +1,78 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "MACustomCalloutViewFactory.h"
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
#import <objc/runtime.h>
|
||||
#import "FluttifyMessageCodec.h"
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation MACustomCalloutViewFactory {
|
||||
}
|
||||
|
||||
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSObject<FlutterMessageCodec>*)createArgsCodec {
|
||||
return [FlutterStandardMessageCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]];
|
||||
}
|
||||
|
||||
- (NSObject <FlutterPlatformView> *)createWithFrame:(CGRect)frame viewIdentifier:(int64_t)viewId arguments:(id _Nullable)args {
|
||||
return [[MACustomCalloutViewPlatformView alloc] initWithViewId:viewId frame: frame registrar:_registrar arguments: args];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MACustomCalloutViewPlatformView {
|
||||
int64_t _viewId;
|
||||
CGRect _frame;
|
||||
NSDictionary<NSString *, Handler>* _handlerMap;
|
||||
MACustomCalloutView* _view;
|
||||
id _args;
|
||||
}
|
||||
|
||||
- (instancetype)initWithViewId:(int64_t)viewId frame:(CGRect)frame registrar:(NSObject <FlutterPluginRegistrar> *)registrar arguments:(id _Nullable)args {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_viewId = viewId;
|
||||
_registrar = registrar;
|
||||
_frame = frame;
|
||||
_args = args;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (UIView *)view {
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
if (_view == nil) {
|
||||
NSDictionary<NSString*, id>* params = (NSDictionary<NSString*, id>*) _args;
|
||||
|
||||
_view = [[MACustomCalloutView alloc] initWithFrame:_frame];
|
||||
|
||||
////////////////////////////////初始化UiKitView////////////////////////////////////////
|
||||
|
||||
////////////////////////////////初始化UiKitView////////////////////////////////////////
|
||||
|
||||
// 这里用一个magic number调整一下id
|
||||
// 同时存放viewId和refId的对象, 供后续viewId转refId使用
|
||||
HEAP[[NSString stringWithFormat:@"%@", @(2147483647 - _viewId)]] = _view;
|
||||
HEAP[[NSString stringWithFormat:@"%@:%@", @"MACustomCalloutView", @(_view.hash)]] = _view;
|
||||
}
|
||||
return _view;
|
||||
}
|
||||
|
||||
@end
|
23
ios/Classes/MAMapViewFactory.h
Normal file
23
ios/Classes/MAMapViewFactory.h
Normal file
@ -0,0 +1,23 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
@interface MAMapViewFactory : NSObject <FlutterPlatformViewFactory>
|
||||
|
||||
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
@interface MAMapViewPlatformView : NSObject
|
||||
|
||||
- (instancetype)initWithViewId:(int64_t)viewId frame:(CGRect)frame registrar:(NSObject <FlutterPluginRegistrar> *)registrar arguments:(id _Nullable)args;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
114
ios/Classes/MAMapViewFactory.m
Normal file
114
ios/Classes/MAMapViewFactory.m
Normal file
@ -0,0 +1,114 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "MAMapViewFactory.h"
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
#import <objc/runtime.h>
|
||||
#import "FluttifyMessageCodec.h"
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation MAMapViewFactory {
|
||||
}
|
||||
|
||||
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSObject<FlutterMessageCodec>*)createArgsCodec {
|
||||
return [FlutterStandardMessageCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]];
|
||||
}
|
||||
|
||||
- (NSObject <FlutterPlatformView> *)createWithFrame:(CGRect)frame viewIdentifier:(int64_t)viewId arguments:(id _Nullable)args {
|
||||
return [[MAMapViewPlatformView alloc] initWithViewId:viewId frame: frame registrar:_registrar arguments: args];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MAMapViewPlatformView {
|
||||
int64_t _viewId;
|
||||
CGRect _frame;
|
||||
NSDictionary<NSString *, Handler>* _handlerMap;
|
||||
MAMapView* _view;
|
||||
id _args;
|
||||
}
|
||||
|
||||
- (instancetype)initWithViewId:(int64_t)viewId frame:(CGRect)frame registrar:(NSObject <FlutterPluginRegistrar> *)registrar arguments:(id _Nullable)args {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_viewId = viewId;
|
||||
_registrar = registrar;
|
||||
_frame = frame;
|
||||
_args = args;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (UIView *)view {
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
if (_view == nil) {
|
||||
NSDictionary<NSString*, id>* params = (NSDictionary<NSString*, id>*) _args;
|
||||
|
||||
_view = [[MAMapView alloc] initWithFrame:_frame];
|
||||
|
||||
////////////////////////////////初始化UiKitView////////////////////////////////////////
|
||||
NSNumber* mapType = (NSNumber*) params[@"mapType"];
|
||||
NSNumber* showZoomControl = (NSNumber*) params[@"showZoomControl"];
|
||||
NSNumber* showCompass = (NSNumber*) params[@"showCompass"];
|
||||
NSNumber* showScaleControl = (NSNumber*) params[@"showScaleControl"];
|
||||
NSNumber* zoomGesturesEnabled = (NSNumber*) params[@"zoomGesturesEnabled"];
|
||||
NSNumber* scrollGesturesEnabled = (NSNumber*) params[@"scrollGesturesEnabled"];
|
||||
NSNumber* rotateGestureEnabled = (NSNumber*) params[@"rotateGestureEnabled"];
|
||||
NSNumber* tiltGestureEnabled = (NSNumber*) params[@"tiltGestureEnabled"];
|
||||
NSNumber* zoomLevel = (NSNumber*) params[@"zoomLevel"];
|
||||
NSNumber* tilt = (NSNumber*) params[@"tilt"];
|
||||
NSNumber* bearing = (NSNumber*) params[@"bearing"];
|
||||
NSNumber* centerCoordinateLatitude = (NSNumber*) params[@"centerCoordinateLatitude"];
|
||||
NSNumber* centerCoordinateLongitude = (NSNumber*) params[@"centerCoordinateLongitude"];
|
||||
|
||||
if (mapType != nil && (NSNull*)
|
||||
mapType != [NSNull null]) _view.mapType = [mapType intValue];
|
||||
if (showCompass != nil && (NSNull*) showCompass != [NSNull null])
|
||||
_view.showsCompass = [showCompass boolValue];
|
||||
if (showScaleControl != nil && (NSNull*) showScaleControl != [NSNull null])
|
||||
_view.showsScale = [showScaleControl boolValue];
|
||||
if (zoomGesturesEnabled != nil && (NSNull*) zoomGesturesEnabled != [NSNull null])
|
||||
_view.zoomEnabled = [zoomGesturesEnabled boolValue];
|
||||
if (scrollGesturesEnabled != nil && (NSNull*) scrollGesturesEnabled != [NSNull null])
|
||||
_view.scrollEnabled = [scrollGesturesEnabled boolValue];
|
||||
if (rotateGestureEnabled != nil && (NSNull*) rotateGestureEnabled != [NSNull null])
|
||||
_view.rotateEnabled = [rotateGestureEnabled boolValue];
|
||||
if (tiltGestureEnabled != nil && (NSNull*) tiltGestureEnabled != [NSNull null])
|
||||
_view.rotateCameraEnabled = [tiltGestureEnabled boolValue];
|
||||
if (zoomLevel != nil && (NSNull*) zoomLevel != [NSNull null])
|
||||
_view.zoomLevel = [zoomLevel doubleValue];
|
||||
if (tilt != nil && (NSNull*) tilt != [NSNull null])
|
||||
_view.cameraDegree = [tilt doubleValue];
|
||||
if (bearing != nil && (NSNull*) bearing != [NSNull null])
|
||||
_view.rotationDegree = [bearing doubleValue];
|
||||
if ((centerCoordinateLatitude != nil && (NSNull*) centerCoordinateLatitude != [NSNull null])
|
||||
&& (centerCoordinateLongitude != nil && (NSNull*) centerCoordinateLongitude != [NSNull null]))
|
||||
_view.centerCoordinate = CLLocationCoordinate2DMake([centerCoordinateLatitude doubleValue], [centerCoordinateLongitude doubleValue]);
|
||||
////////////////////////////////初始化UiKitView////////////////////////////////////////
|
||||
|
||||
// 这里用一个magic number调整一下id
|
||||
// 同时存放viewId和refId的对象, 供后续viewId转refId使用
|
||||
HEAP[[NSString stringWithFormat:@"%@", @(2147483647 - _viewId)]] = _view;
|
||||
HEAP[[NSString stringWithFormat:@"%@:%@", @"MAMapView", @(_view.hash)]] = _view;
|
||||
}
|
||||
return _view;
|
||||
}
|
||||
|
||||
@end
|
23
ios/Classes/MAPinAnnotationViewFactory.h
Normal file
23
ios/Classes/MAPinAnnotationViewFactory.h
Normal file
@ -0,0 +1,23 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Flutter/Flutter.h>
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
@interface MAPinAnnotationViewFactory : NSObject <FlutterPlatformViewFactory>
|
||||
|
||||
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
||||
|
||||
@interface MAPinAnnotationViewPlatformView : NSObject
|
||||
|
||||
- (instancetype)initWithViewId:(int64_t)viewId frame:(CGRect)frame registrar:(NSObject <FlutterPluginRegistrar> *)registrar arguments:(id _Nullable)args;
|
||||
|
||||
@property(nonatomic) NSObject<FlutterPluginRegistrar>* registrar;
|
||||
|
||||
@end
|
78
ios/Classes/MAPinAnnotationViewFactory.m
Normal file
78
ios/Classes/MAPinAnnotationViewFactory.m
Normal file
@ -0,0 +1,78 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "MAPinAnnotationViewFactory.h"
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
#import <objc/runtime.h>
|
||||
#import "FluttifyMessageCodec.h"
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation MAPinAnnotationViewFactory {
|
||||
}
|
||||
|
||||
- (instancetype)initWithRegistrar:(NSObject <FlutterPluginRegistrar> *)registrar {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_registrar = registrar;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSObject<FlutterMessageCodec>*)createArgsCodec {
|
||||
return [FlutterStandardMessageCodec codecWithReaderWriter:[[FluttifyReaderWriter alloc] init]];
|
||||
}
|
||||
|
||||
- (NSObject <FlutterPlatformView> *)createWithFrame:(CGRect)frame viewIdentifier:(int64_t)viewId arguments:(id _Nullable)args {
|
||||
return [[MAPinAnnotationViewPlatformView alloc] initWithViewId:viewId frame: frame registrar:_registrar arguments: args];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation MAPinAnnotationViewPlatformView {
|
||||
int64_t _viewId;
|
||||
CGRect _frame;
|
||||
NSDictionary<NSString *, Handler>* _handlerMap;
|
||||
MAPinAnnotationView* _view;
|
||||
id _args;
|
||||
}
|
||||
|
||||
- (instancetype)initWithViewId:(int64_t)viewId frame:(CGRect)frame registrar:(NSObject <FlutterPluginRegistrar> *)registrar arguments:(id _Nullable)args {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_viewId = viewId;
|
||||
_registrar = registrar;
|
||||
_frame = frame;
|
||||
_args = args;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (UIView *)view {
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
if (_view == nil) {
|
||||
NSDictionary<NSString*, id>* params = (NSDictionary<NSString*, id>*) _args;
|
||||
|
||||
_view = [[MAPinAnnotationView alloc] initWithFrame:_frame];
|
||||
|
||||
////////////////////////////////初始化UiKitView////////////////////////////////////////
|
||||
|
||||
////////////////////////////////初始化UiKitView////////////////////////////////////////
|
||||
|
||||
// 这里用一个magic number调整一下id
|
||||
// 同时存放viewId和refId的对象, 供后续viewId转refId使用
|
||||
HEAP[[NSString stringWithFormat:@"%@", @(2147483647 - _viewId)]] = _view;
|
||||
HEAP[[NSString stringWithFormat:@"%@:%@", @"MAPinAnnotationView", @(_view.hash)]] = _view;
|
||||
}
|
||||
return _view;
|
||||
}
|
||||
|
||||
@end
|
59
ios/Classes/SubHandler/Custom/PathSmooth/MASmoothPathTool.h
Normal file
59
ios/Classes/SubHandler/Custom/PathSmooth/MASmoothPathTool.h
Normal file
@ -0,0 +1,59 @@
|
||||
//
|
||||
// MASmoothPathTool.h
|
||||
// iOS-path-smooth
|
||||
//
|
||||
// Created by shaobin on 2017/10/12.
|
||||
// Copyright © 2017年 autonavi. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface MALonLatPoint : NSObject
|
||||
@property (nonatomic, assign) double lat;
|
||||
@property (nonatomic, assign) double lon;
|
||||
@end
|
||||
|
||||
@interface MASmoothPathTool : NSObject
|
||||
|
||||
@property (nonatomic, assign) int intensity;
|
||||
@property (nonatomic, assign) float threshHold;
|
||||
@property (nonatomic, assign) int noiseThreshhold;
|
||||
|
||||
/**
|
||||
* 轨迹平滑优化
|
||||
* @param originlist 原始轨迹list,list.size大于2
|
||||
* @return 优化后轨迹list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)pathOptimize:(NSArray<MALonLatPoint*>*)originlist;
|
||||
|
||||
/**
|
||||
* 轨迹线路滤波
|
||||
* @param originlist 原始轨迹list,list.size大于2
|
||||
* @return 滤波处理后的轨迹list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)kalmanFilterPath:(NSArray<MALonLatPoint*>*)originlist;
|
||||
|
||||
|
||||
/**
|
||||
* 轨迹去噪,删除垂距大于20m的点
|
||||
* @param originlist 原始轨迹list,list.size大于2
|
||||
* @return 去燥后的list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)removeNoisePoint:(NSArray<MALonLatPoint*>*)originlist;
|
||||
|
||||
/**
|
||||
* 单点滤波
|
||||
* @param lastLoc 上次定位点坐标
|
||||
* @param curLoc 本次定位点坐标
|
||||
* @return 滤波后本次定位点坐标值
|
||||
*/
|
||||
- (MALonLatPoint*)kalmanFilterPoint:(MALonLatPoint*)lastLoc curLoc:(MALonLatPoint*)curLoc;
|
||||
|
||||
/**
|
||||
* 轨迹抽稀
|
||||
* @param inPoints 待抽稀的轨迹list,至少包含两个点,删除垂距小于mThreshhold的点
|
||||
* @return 抽稀后的轨迹list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)reducerVerticalThreshold:(NSArray<MALonLatPoint*>*)inPoints;
|
||||
|
||||
@end
|
297
ios/Classes/SubHandler/Custom/PathSmooth/MASmoothPathTool.m
Normal file
297
ios/Classes/SubHandler/Custom/PathSmooth/MASmoothPathTool.m
Normal file
@ -0,0 +1,297 @@
|
||||
//
|
||||
// MASmoothPathTool.m
|
||||
// iOS-path-smooth
|
||||
//
|
||||
// Created by shaobin on 2017/10/12.
|
||||
// Copyright © 2017年 autonavi. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MASmoothPathTool.h"
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
@implementation MALonLatPoint
|
||||
@end
|
||||
|
||||
@implementation MASmoothPathTool
|
||||
{
|
||||
double lastLocation_x; //上次位置
|
||||
double currentLocation_x;//这次位置
|
||||
double lastLocation_y; //上次位置
|
||||
double currentLocation_y;//这次位置
|
||||
double estimate_x; //修正后数据
|
||||
double estimate_y; //修正后数据
|
||||
double pdelt_x; //自预估偏差
|
||||
double pdelt_y; //自预估偏差
|
||||
double mdelt_x; //上次模型偏差
|
||||
double mdelt_y; //上次模型偏差
|
||||
double gauss_x; //高斯噪音偏差
|
||||
double gauss_y; //高斯噪音偏差
|
||||
double kalmanGain_x; //卡尔曼增益
|
||||
double kalmanGain_y; //卡尔曼增益
|
||||
|
||||
double m_R;
|
||||
double m_Q;
|
||||
}
|
||||
|
||||
- (id)init {
|
||||
self = [super init];
|
||||
|
||||
if(self) {
|
||||
self.intensity = 3;
|
||||
self.threshHold = 0.3f;
|
||||
self.noiseThreshhold = 10;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
/**
|
||||
* 轨迹平滑优化
|
||||
* @param originlist 原始轨迹list,list.size大于2
|
||||
* @return 优化后轨迹list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)pathOptimize:(NSArray<MALonLatPoint*>*)originlist {
|
||||
|
||||
NSArray<MALonLatPoint*>* list = [self removeNoisePoint:originlist];//去噪
|
||||
NSArray<MALonLatPoint*>* afterList = [self kalmanFilterPath:list intensity:self.intensity];//滤波
|
||||
NSArray<MALonLatPoint*>* pathoptimizeList = [self reducerVerticalThreshold:afterList threshHold:self.threshHold];//抽稀
|
||||
return pathoptimizeList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 轨迹线路滤波
|
||||
* @param originlist 原始轨迹list,list.size大于2
|
||||
* @return 滤波处理后的轨迹list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)kalmanFilterPath:(NSArray<MALonLatPoint*>*)originlist {
|
||||
return [self kalmanFilterPath:originlist intensity:self.intensity];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 轨迹去噪,删除垂距大于20m的点
|
||||
* @param originlist 原始轨迹list,list.size大于2
|
||||
* @return 去燥后的list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)removeNoisePoint:(NSArray<MALonLatPoint*>*)originlist{
|
||||
return [self reduceNoisePoint:originlist threshHold:self.noiseThreshhold];
|
||||
}
|
||||
|
||||
/**
|
||||
* 单点滤波
|
||||
* @param lastLoc 上次定位点坐标
|
||||
* @param curLoc 本次定位点坐标
|
||||
* @return 滤波后本次定位点坐标值
|
||||
*/
|
||||
- (MALonLatPoint*)kalmanFilterPoint:(MALonLatPoint*)lastLoc curLoc:(MALonLatPoint*)curLoc {
|
||||
return [self kalmanFilterPoint:lastLoc curLoc:curLoc intensity:self.intensity];
|
||||
}
|
||||
|
||||
/**
|
||||
* 轨迹抽稀
|
||||
* @param inPoints 待抽稀的轨迹list,至少包含两个点,删除垂距小于mThreshhold的点
|
||||
* @return 抽稀后的轨迹list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)reducerVerticalThreshold:(NSArray<MALonLatPoint*>*)inPoints {
|
||||
return [self reducerVerticalThreshold:inPoints threshHold:self.threshHold];
|
||||
}
|
||||
|
||||
/********************************************************************************************************/
|
||||
/**
|
||||
* 轨迹线路滤波
|
||||
* @param originlist 原始轨迹list,list.size大于2
|
||||
* @param intensity 滤波强度(1—5)
|
||||
* @return 滤波后的list
|
||||
*/
|
||||
- (NSArray<MALonLatPoint*>*)kalmanFilterPath:(NSArray<MALonLatPoint*>*)originlist intensity:(int)intensity {
|
||||
if (!originlist || originlist.count <= 2) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
NSMutableArray<MALonLatPoint*>* kalmanFilterList = [NSMutableArray array];
|
||||
|
||||
[self initial];//初始化滤波参数
|
||||
|
||||
MALonLatPoint* point = nil;
|
||||
MALonLatPoint* lastLoc = [[MALonLatPoint alloc] init];
|
||||
lastLoc.lat = [originlist objectAtIndex:0].lat;
|
||||
lastLoc.lon = [originlist objectAtIndex:0].lon;
|
||||
[kalmanFilterList addObject:lastLoc];
|
||||
|
||||
for (int i = 1; i < originlist.count; i++) {
|
||||
MALonLatPoint* curLoc = [originlist objectAtIndex:i];
|
||||
point = [self kalmanFilterPoint:lastLoc curLoc:curLoc intensity:intensity];
|
||||
if (point) {
|
||||
[kalmanFilterList addObject:point];
|
||||
lastLoc = point;
|
||||
}
|
||||
}
|
||||
return kalmanFilterList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 单点滤波
|
||||
* @param lastLoc 上次定位点坐标
|
||||
* @param curLoc 本次定位点坐标
|
||||
* @param intensity 滤波强度(1—5)
|
||||
* @return 滤波后本次定位点坐标值
|
||||
*/
|
||||
- (MALonLatPoint*)kalmanFilterPoint:(MALonLatPoint*)lastLoc curLoc:(MALonLatPoint*)curLoc intensity:(int)intensity {
|
||||
if (!lastLoc || !curLoc){
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (pdelt_x == 0 || pdelt_y == 0 ){
|
||||
[self initial];
|
||||
}
|
||||
|
||||
MALonLatPoint* point = nil;
|
||||
if (intensity < 1){
|
||||
intensity = 1;
|
||||
} else if (intensity > 5){
|
||||
intensity = 5;
|
||||
}
|
||||
for (int j = 0; j < intensity; j++){
|
||||
point = [self kalmanFilter:lastLoc.lon value_x:curLoc.lon oldValue_y:lastLoc.lat value_y:curLoc.lat];
|
||||
curLoc = point;
|
||||
}
|
||||
return point;
|
||||
}
|
||||
|
||||
|
||||
/***************************卡尔曼滤波开始********************************/
|
||||
|
||||
//初始模型
|
||||
- (void)initial {
|
||||
pdelt_x = 0.001;
|
||||
pdelt_y = 0.001;
|
||||
// mdelt_x = 0;
|
||||
// mdelt_y = 0;
|
||||
mdelt_x = 5.698402909980532E-4;
|
||||
mdelt_y = 5.698402909980532E-4;
|
||||
}
|
||||
|
||||
- (MALonLatPoint*)kalmanFilter:(double)oldValue_x value_x:(double)value_x oldValue_y:(double)oldValue_y value_y:(double)value_y{
|
||||
lastLocation_x = oldValue_x;
|
||||
currentLocation_x= value_x;
|
||||
|
||||
gauss_x = sqrt(pdelt_x * pdelt_x + mdelt_x * mdelt_x)+m_Q; //计算高斯噪音偏差
|
||||
kalmanGain_x = sqrt((gauss_x * gauss_x)/(gauss_x * gauss_x + pdelt_x * pdelt_x)) +m_R; //计算卡尔曼增益
|
||||
estimate_x = kalmanGain_x * (currentLocation_x - lastLocation_x) + lastLocation_x; //修正定位点
|
||||
mdelt_x = sqrt((1-kalmanGain_x) * gauss_x *gauss_x); //修正模型偏差
|
||||
|
||||
lastLocation_y = oldValue_y;
|
||||
currentLocation_y = value_y;
|
||||
gauss_y = sqrt(pdelt_y * pdelt_y + mdelt_y * mdelt_y)+m_Q; //计算高斯噪音偏差
|
||||
kalmanGain_y = sqrt((gauss_y * gauss_y)/(gauss_y * gauss_y + pdelt_y * pdelt_y)) +m_R; //计算卡尔曼增益
|
||||
estimate_y = kalmanGain_y * (currentLocation_y - lastLocation_y) + lastLocation_y; //修正定位点
|
||||
mdelt_y = sqrt((1-kalmanGain_y) * gauss_y * gauss_y); //修正模型偏差
|
||||
|
||||
MALonLatPoint *point = [[MALonLatPoint alloc] init];
|
||||
point.lon = estimate_x;
|
||||
point.lat = estimate_y;
|
||||
|
||||
return point;
|
||||
}
|
||||
/***************************卡尔曼滤波结束**********************************/
|
||||
|
||||
/***************************抽稀算法*************************************/
|
||||
- (NSArray<MALonLatPoint*>*)reducerVerticalThreshold:(NSArray<MALonLatPoint*>*)inPoints threshHold:(float)threshHold {
|
||||
if(inPoints.count < 2) {
|
||||
return inPoints;
|
||||
}
|
||||
|
||||
NSMutableArray *ret = [NSMutableArray arrayWithCapacity:inPoints.count];
|
||||
|
||||
for(int i = 0; i < inPoints.count; ++i) {
|
||||
MALonLatPoint *pre = ret.lastObject;
|
||||
MALonLatPoint *cur = [inPoints objectAtIndex:i];
|
||||
|
||||
|
||||
if (!pre || i == inPoints.count - 1) {
|
||||
[ret addObject:[inPoints objectAtIndex:i]];
|
||||
continue;
|
||||
}
|
||||
|
||||
MALonLatPoint *next = [inPoints objectAtIndex:(i + 1)];
|
||||
|
||||
MAMapPoint curP = MAMapPointForCoordinate(CLLocationCoordinate2DMake(cur.lat, cur.lon));
|
||||
MAMapPoint prevP = MAMapPointForCoordinate(CLLocationCoordinate2DMake(pre.lat, pre.lon));
|
||||
MAMapPoint nextP = MAMapPointForCoordinate(CLLocationCoordinate2DMake(next.lat, next.lon));
|
||||
double distance = [self calculateDistanceFromPoint:curP lineBegin:prevP lineEnd:nextP];
|
||||
if (distance >= threshHold) {
|
||||
[ret addObject:cur];
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (MALonLatPoint*)getLastLocation:(NSArray<MALonLatPoint*>*)oneGraspList {
|
||||
if (!oneGraspList || oneGraspList.count == 0) {
|
||||
return nil;
|
||||
}
|
||||
NSInteger locListSize = oneGraspList.count;
|
||||
MALonLatPoint* lastLocation = [oneGraspList objectAtIndex:(locListSize - 1)];
|
||||
return lastLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算当前点到线的垂线距离
|
||||
* @param pt 当前点
|
||||
* @param begin 线的起点
|
||||
* @param end 线的终点
|
||||
*
|
||||
*/
|
||||
- (double)calculateDistanceFromPoint:(MAMapPoint)pt
|
||||
lineBegin:(MAMapPoint)begin
|
||||
lineEnd:(MAMapPoint)end {
|
||||
|
||||
MAMapPoint mappedPoint;
|
||||
double dx = begin.x - end.x;
|
||||
double dy = begin.y - end.y;
|
||||
if(fabs(dx) < 0.00000001 && fabs(dy) < 0.00000001 ) {
|
||||
mappedPoint = begin;
|
||||
} else {
|
||||
double u = (pt.x - begin.x)*(begin.x - end.x) +
|
||||
(pt.y - begin.y)*(begin.y - end.y);
|
||||
u = u/((dx*dx)+(dy*dy));
|
||||
|
||||
mappedPoint.x = begin.x + u*dx;
|
||||
mappedPoint.y = begin.y + u*dy;
|
||||
}
|
||||
|
||||
return MAMetersBetweenMapPoints(pt, mappedPoint);
|
||||
}
|
||||
/***************************抽稀算法结束*********************************/
|
||||
|
||||
- (NSArray<MALonLatPoint*>*)reduceNoisePoint:(NSArray<MALonLatPoint*>*)inPoints threshHold:(float)threshHold {
|
||||
if (!inPoints) {
|
||||
return nil;
|
||||
}
|
||||
if (inPoints.count <= 2) {
|
||||
return inPoints;
|
||||
}
|
||||
|
||||
NSMutableArray<MALonLatPoint*>* ret = [NSMutableArray array];
|
||||
for (int i = 0; i < inPoints.count; i++) {
|
||||
MALonLatPoint* pre = [self getLastLocation:ret];
|
||||
MALonLatPoint* cur = [inPoints objectAtIndex:i];
|
||||
if (!pre || i == inPoints.count - 1) {
|
||||
[ret addObject:cur];
|
||||
continue;
|
||||
}
|
||||
MALonLatPoint* next = [inPoints objectAtIndex:(i + 1)];
|
||||
|
||||
MAMapPoint curP = MAMapPointForCoordinate(CLLocationCoordinate2DMake(cur.lat, cur.lon));
|
||||
MAMapPoint prevP = MAMapPointForCoordinate(CLLocationCoordinate2DMake(pre.lat, pre.lon));
|
||||
MAMapPoint nextP = MAMapPointForCoordinate(CLLocationCoordinate2DMake(next.lat, next.lon));
|
||||
double distance = [self calculateDistanceFromPoint:curP lineBegin:prevP lineEnd:nextP];
|
||||
if (distance < threshHold){
|
||||
[ret addObject:cur];
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@end
|
13
ios/Classes/SubHandler/Custom/SubHandlerCustom.h
Normal file
13
ios/Classes/SubHandler/Custom/SubHandlerCustom.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandlerCustom)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandlerCustom;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
777
ios/Classes/SubHandler/Custom/SubHandlerCustom.m
Normal file
777
ios/Classes/SubHandler/Custom/SubHandlerCustom.m
Normal file
@ -0,0 +1,777 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "SubHandlerCustom.h"
|
||||
#import "PathSmooth/MASmoothPathTool.h"
|
||||
#import <MAMapKit/MAMapKit.h>
|
||||
|
||||
// Dart端一次方法调用所存在的栈, 只有当MethodChannel传递参数受限时, 再启用这个容器
|
||||
extern NSMutableDictionary<NSString*, NSObject*>* STACK;
|
||||
// Dart端随机存取对象的容器
|
||||
extern NSMutableDictionary<NSNumber*, NSObject*>* HEAP;
|
||||
// 日志打印开关
|
||||
extern BOOL enableLog;
|
||||
|
||||
@implementation AmapMapFluttifyPlugin (SubHandlerCustom)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandlerCustom {
|
||||
return @{
|
||||
@"MAMapRectIsEmpty::MAMapRectIsEmpty": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// args
|
||||
// struct arg
|
||||
NSValue* rectValue = (NSValue*) args[@"rect"];
|
||||
MAMapRect rect;
|
||||
[rectValue getValue:&rect];
|
||||
|
||||
// ref
|
||||
|
||||
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"fluttify-objc: MAMapRectIsEmpty::MAMapRectIsEmpty(%@)", args[@"rect"]);
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
BOOL result = MAMapRectIsEmpty(rect);
|
||||
|
||||
// result
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
|
||||
@"MALonLatPoint::set_lat_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
double lat = [args[@"lat"] doubleValue];
|
||||
|
||||
// ref
|
||||
MALonLatPoint* ref = (MALonLatPoint*) args[@"__this__"];
|
||||
|
||||
ref.lat = lat;
|
||||
methodResult(@"success");
|
||||
}
|
||||
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MALonLatPoint::set_lon_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
double lon = [args[@"lon"] doubleValue];
|
||||
|
||||
// ref
|
||||
MALonLatPoint* ref = (MALonLatPoint*) args[@"__this__"];
|
||||
|
||||
ref.lon = lon;
|
||||
methodResult(@"success");
|
||||
}
|
||||
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::set_intensity_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
int intensity = [args[@"intensity"] intValue];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
ref.intensity = intensity;
|
||||
methodResult(@"success");
|
||||
}
|
||||
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::set_threshHold_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
float threshHold = [args[@"threshHold"] floatValue];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
ref.threshHold = threshHold;
|
||||
methodResult(@"success");
|
||||
}
|
||||
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::set_noiseThreshhold_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
int noiseThreshhold = [args[@"noiseThreshhold"] intValue];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
ref.noiseThreshhold = noiseThreshhold;
|
||||
methodResult(@"success");
|
||||
}
|
||||
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MALonLatPoint::get_lat_batch": ^(NSObject <FlutterPluginRegistrar>* registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// ref object
|
||||
MALonLatPoint* ref = (MALonLatPoint*) args[@"__this__"];
|
||||
|
||||
double result = ref.lat;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
|
||||
@"MALonLatPoint::get_lon_batch": ^(NSObject <FlutterPluginRegistrar>* registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// ref object
|
||||
MALonLatPoint* ref = (MALonLatPoint*) args[@"__this__"];
|
||||
|
||||
double result = ref.lon;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::get_intensity_batch": ^(NSObject <FlutterPluginRegistrar>* registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// ref object
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
int result = ref.intensity;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::get_threshHold_batch": ^(NSObject <FlutterPluginRegistrar>* registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// ref object
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
float result = ref.threshHold;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::get_noiseThreshhold_batch": ^(NSObject <FlutterPluginRegistrar>* registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// ref object
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
int result = ref.noiseThreshhold;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::pathOptimize": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// args
|
||||
// list arg
|
||||
NSArray<MALonLatPoint*>* originlist = (NSArray<MALonLatPoint*>*) args[@"originlist"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"fluttify-objc: MASmoothPathTool@%@::pathOptimize(%@)", args[@"refId"], args[@"originlist"]);
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
NSArray<MALonLatPoint*>* result = [ref pathOptimize: originlist];
|
||||
|
||||
// result
|
||||
// 返回值: 列表
|
||||
NSMutableArray<NSObject*>* __result__ = [NSMutableArray array];
|
||||
for (int __i__ = 0; __i__ < result.count; __i__++) {
|
||||
NSObject* object = [result objectAtIndex:__i__];
|
||||
[__result__ addObject: object];
|
||||
}
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
@"MASmoothPathTool::kalmanFilterPath": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// args
|
||||
// list arg
|
||||
NSArray<MALonLatPoint*>* originlist = (NSArray<MALonLatPoint*>*) args[@"originlist"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"fluttify-objc: MASmoothPathTool@%@::kalmanFilterPath(%@)", args[@"refId"], args[@"originlist"]);
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
NSArray<MALonLatPoint*>* result = [ref kalmanFilterPath: originlist];
|
||||
|
||||
// result
|
||||
// 返回值: 列表
|
||||
NSMutableArray<NSObject*>* __result__ = [NSMutableArray array];
|
||||
for (int __i__ = 0; __i__ < result.count; __i__++) {
|
||||
NSObject* object = [result objectAtIndex:__i__];
|
||||
[__result__ addObject: object];
|
||||
}
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
@"MASmoothPathTool::removeNoisePoint": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// args
|
||||
// list arg
|
||||
NSArray<MALonLatPoint*>* originlist = (NSArray<MALonLatPoint*>*) args[@"originlist"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"fluttify-objc: MASmoothPathTool@%@::removeNoisePoint(%@)", args[@"refId"], args[@"originlist"]);
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
NSArray<MALonLatPoint*>* result = [ref removeNoisePoint: originlist];
|
||||
|
||||
// result
|
||||
// 返回值: 列表
|
||||
NSMutableArray<NSObject*>* __result__ = [NSMutableArray array];
|
||||
for (int __i__ = 0; __i__ < result.count; __i__++) {
|
||||
NSObject* object = [result objectAtIndex:__i__];
|
||||
[__result__ addObject: object];
|
||||
}
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
@"MASmoothPathTool::kalmanFilterPoint_curLoc": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// args
|
||||
// ref arg
|
||||
MALonLatPoint* lastLoc = (MALonLatPoint*) args[@"lastLoc"];
|
||||
// ref arg
|
||||
MALonLatPoint* curLoc = (MALonLatPoint*) args[@"curLoc"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"fluttify-objc: MASmoothPathTool@%@::kalmanFilterPoint(%@, %@)", args[@"refId"], args[@"lastLoc"], args[@"curLoc"]);
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
MALonLatPoint* result = [ref kalmanFilterPoint: lastLoc curLoc: curLoc];
|
||||
|
||||
// result
|
||||
// return a ref
|
||||
id __result__ = result;
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
@"MASmoothPathTool::reducerVerticalThreshold": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// args
|
||||
// list arg
|
||||
NSArray<MALonLatPoint*>* inPoints = (NSArray<MALonLatPoint*>*) args[@"inPoints"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"fluttify-objc: MASmoothPathTool@%@::reducerVerticalThreshold(%@)", args[@"refId"], args[@"inPoints"]);
|
||||
}
|
||||
|
||||
// invoke native method
|
||||
NSArray<MALonLatPoint*>* result = [ref reducerVerticalThreshold: inPoints];
|
||||
|
||||
// result
|
||||
// 返回值: 列表
|
||||
NSMutableArray<NSObject*>* __result__ = [NSMutableArray array];
|
||||
for (int __i__ = 0; __i__ < result.count; __i__++) {
|
||||
NSObject* object = [result objectAtIndex:__i__];
|
||||
[__result__ addObject: object];
|
||||
}
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
@"ObjectFactory::createMALonLatPoint": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"ObjectFactory::createMALonLatPoint");
|
||||
}
|
||||
|
||||
MALonLatPoint* __this__;
|
||||
if ([((NSDictionary<NSString*, id>*) args)[@"init"] boolValue]) {
|
||||
__this__ = [[MALonLatPoint alloc] init];
|
||||
} else {
|
||||
__this__ = [MALonLatPoint alloc];
|
||||
}
|
||||
|
||||
methodResult(__this__);
|
||||
|
||||
if (enableLog) NSLog(@"HEAP: %@", HEAP);
|
||||
},
|
||||
|
||||
@"ObjectFactory::createMASmoothPathTool": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"ObjectFactory::createMASmoothPathTool");
|
||||
}
|
||||
|
||||
MASmoothPathTool* __this__;
|
||||
if ([((NSDictionary<NSString*, id>*) args)[@"init"] boolValue]) {
|
||||
__this__ = [[MASmoothPathTool alloc] init];
|
||||
} else {
|
||||
__this__ = [MASmoothPathTool alloc];
|
||||
}
|
||||
|
||||
methodResult(__this__);
|
||||
|
||||
if (enableLog) NSLog(@"HEAP: %@", HEAP);
|
||||
},
|
||||
|
||||
@"RefClass::isKindOfMALonLatPoint": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// 引用对象
|
||||
NSObject* __this__ = ((NSDictionary<NSString*, NSObject*>*) args)[@"__this__"];
|
||||
|
||||
BOOL isTargetType = [__this__ isKindOfClass:[MALonLatPoint class]];
|
||||
methodResult(@(isTargetType));
|
||||
},
|
||||
|
||||
@"RefClass::isKindOfMASmoothPathTool": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// 引用对象
|
||||
NSObject* __this__ = ((NSDictionary<NSString*, NSObject*>*) args)[@"__this__"];
|
||||
|
||||
BOOL isTargetType = [__this__ isKindOfClass:[MASmoothPathTool class]];
|
||||
methodResult(@(isTargetType));
|
||||
},
|
||||
|
||||
@"ObjectFactory::create_batchMALonLatPoint": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray<NSObject*>* resultList = [NSMutableArray array];
|
||||
|
||||
NSNumber* length = (NSNumber*) ((NSDictionary<NSString*, NSObject*>*) argsBatch)[@"length"];
|
||||
NSNumber* init = (NSNumber*) ((NSDictionary<NSString*, NSObject*>*) argsBatch)[@"init"];
|
||||
for (int __i__ = 0; __i__ < [length integerValue]; __i__++) {
|
||||
MALonLatPoint* __this__;
|
||||
if ([init boolValue]) {
|
||||
__this__ = [[MALonLatPoint alloc] init];
|
||||
} else {
|
||||
__this__ = [MALonLatPoint alloc];
|
||||
}
|
||||
[resultList addObject:__this__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
|
||||
if (enableLog) NSLog(@"HEAP: %@", HEAP);
|
||||
},
|
||||
|
||||
@"ObjectFactory::create_batchMASmoothPathTool": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray<NSObject*>* resultList = [NSMutableArray array];
|
||||
|
||||
NSNumber* length = (NSNumber*) ((NSDictionary<NSString*, NSObject*>*) argsBatch)[@"length"];
|
||||
NSNumber* init = (NSNumber*) ((NSDictionary<NSString*, NSObject*>*) argsBatch)[@"init"];
|
||||
for (int __i__ = 0; __i__ < [length integerValue]; __i__++) {
|
||||
MASmoothPathTool* __this__;
|
||||
if ([init boolValue]) {
|
||||
__this__ = [[MASmoothPathTool alloc] init];
|
||||
} else {
|
||||
__this__ = [MASmoothPathTool alloc];
|
||||
}
|
||||
[resultList addObject:__this__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
|
||||
if (enableLog) NSLog(@"HEAP: %@", HEAP);
|
||||
},
|
||||
|
||||
|
||||
@"MALonLatPoint::get_lat": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MALonLatPoint::get_lat");
|
||||
}
|
||||
|
||||
// ref object
|
||||
MALonLatPoint* ref = (MALonLatPoint*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
double result = ref.lat;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
|
||||
@"MALonLatPoint::get_lon": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MALonLatPoint::get_lon");
|
||||
}
|
||||
|
||||
// ref object
|
||||
MALonLatPoint* ref = (MALonLatPoint*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
double result = ref.lon;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::get_intensity": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MASmoothPathTool::get_intensity");
|
||||
}
|
||||
|
||||
// ref object
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
int result = ref.intensity;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::get_threshHold": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MASmoothPathTool::get_threshHold");
|
||||
}
|
||||
|
||||
// ref object
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
float result = ref.threshHold;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::get_noiseThreshhold": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MASmoothPathTool::get_noiseThreshhold");
|
||||
}
|
||||
|
||||
// ref object
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
int result = ref.noiseThreshhold;
|
||||
|
||||
// 返回值: Value
|
||||
NSObject* __result__ = @(result);
|
||||
|
||||
methodResult(__result__);
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::pathOptimize_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// list arg
|
||||
NSArray<MALonLatPoint*>* originlist = (NSArray<MALonLatPoint*>*) args[@"originlist"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
NSArray<MALonLatPoint*>* result = [ref pathOptimize: originlist];
|
||||
|
||||
// result
|
||||
// 返回值: 列表
|
||||
NSMutableArray<NSObject*>* __result__ = [NSMutableArray array];
|
||||
for (int __i__ = 0; __i__ < result.count; __i__++) {
|
||||
NSObject* object = [result objectAtIndex:__i__];
|
||||
[__result__ addObject: object];
|
||||
}
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
@"MASmoothPathTool::kalmanFilterPath_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// list arg
|
||||
NSArray<MALonLatPoint*>* originlist = (NSArray<MALonLatPoint*>*) args[@"originlist"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
NSArray<MALonLatPoint*>* result = [ref kalmanFilterPath: originlist];
|
||||
|
||||
// result
|
||||
// 返回值: 列表
|
||||
NSMutableArray<NSObject*>* __result__ = [NSMutableArray array];
|
||||
for (int __i__ = 0; __i__ < result.count; __i__++) {
|
||||
NSObject* object = [result objectAtIndex:__i__];
|
||||
[__result__ addObject: object];
|
||||
}
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
@"MASmoothPathTool::removeNoisePoint_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// list arg
|
||||
NSArray<MALonLatPoint*>* originlist = (NSArray<MALonLatPoint*>*) args[@"originlist"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
NSArray<MALonLatPoint*>* result = [ref removeNoisePoint: originlist];
|
||||
|
||||
// result
|
||||
// 返回值: 列表
|
||||
NSMutableArray<NSObject*>* __result__ = [NSMutableArray array];
|
||||
for (int __i__ = 0; __i__ < result.count; __i__++) {
|
||||
NSObject* object = [result objectAtIndex:__i__];
|
||||
[__result__ addObject: object];
|
||||
}
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
@"MASmoothPathTool::kalmanFilterPoint_curLoc_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// ref arg
|
||||
MALonLatPoint* lastLoc = (MALonLatPoint*) args[@"lastLoc"];
|
||||
// ref arg
|
||||
MALonLatPoint* curLoc = (MALonLatPoint*) args[@"curLoc"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
MALonLatPoint* result = [ref kalmanFilterPoint: lastLoc curLoc: curLoc];
|
||||
|
||||
// result
|
||||
// return a ref
|
||||
id __result__ = result;
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
@"MASmoothPathTool::reducerVerticalThreshold_batch": ^(NSObject <FlutterPluginRegistrar> * registrar, id argsBatch, FlutterResult methodResult) {
|
||||
NSMutableArray* resultList = [NSMutableArray array];
|
||||
|
||||
for (int __i__ = 0; __i__ < ((NSArray<NSDictionary<NSString*, NSObject*>*>*) argsBatch).count; __i__++) {
|
||||
NSDictionary<NSString*, id>* args = [((NSArray<NSDictionary<NSString*, id>*>*) argsBatch) objectAtIndex:__i__];
|
||||
|
||||
// args
|
||||
// list arg
|
||||
NSArray<MALonLatPoint*>* inPoints = (NSArray<MALonLatPoint*>*) args[@"inPoints"];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
// invoke native method
|
||||
NSArray<MALonLatPoint*>* result = [ref reducerVerticalThreshold: inPoints];
|
||||
|
||||
// result
|
||||
// 返回值: 列表
|
||||
NSMutableArray<NSObject*>* __result__ = [NSMutableArray array];
|
||||
for (int __i__ = 0; __i__ < result.count; __i__++) {
|
||||
NSObject* object = [result objectAtIndex:__i__];
|
||||
[__result__ addObject: object];
|
||||
}
|
||||
|
||||
[resultList addObject:__result__];
|
||||
}
|
||||
|
||||
methodResult(resultList);
|
||||
},
|
||||
|
||||
@"MALonLatPoint::set_lat": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MALonLatPoint::set_lat");
|
||||
}
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
double lat = [args[@"lat"] doubleValue];
|
||||
|
||||
// ref
|
||||
MALonLatPoint* ref = (MALonLatPoint*) args[@"__this__"];
|
||||
|
||||
ref.lat = lat;
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MALonLatPoint::set_lon": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MALonLatPoint::set_lon");
|
||||
}
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
double lon = [args[@"lon"] doubleValue];
|
||||
|
||||
// ref
|
||||
MALonLatPoint* ref = (MALonLatPoint*) args[@"__this__"];
|
||||
|
||||
ref.lon = lon;
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::set_intensity": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MASmoothPathTool::set_intensity");
|
||||
}
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
int intensity = [args[@"intensity"] intValue];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
ref.intensity = intensity;
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::set_threshHold": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MASmoothPathTool::set_threshHold");
|
||||
}
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
float threshHold = [args[@"threshHold"] floatValue];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
ref.threshHold = threshHold;
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
@"MASmoothPathTool::set_noiseThreshhold": ^(NSObject <FlutterPluginRegistrar> * registrar, id args, FlutterResult methodResult) {
|
||||
// print log
|
||||
if (enableLog) {
|
||||
NSLog(@"MASmoothPathTool::set_noiseThreshhold");
|
||||
}
|
||||
|
||||
// args
|
||||
// jsonable arg
|
||||
int noiseThreshhold = [args[@"noiseThreshhold"] intValue];
|
||||
|
||||
// ref
|
||||
MASmoothPathTool* ref = (MASmoothPathTool*) args[@"__this__"];
|
||||
|
||||
ref.noiseThreshhold = noiseThreshhold;
|
||||
methodResult(@"success");
|
||||
},
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
13
ios/Classes/SubHandler/SubHandler0.h
Normal file
13
ios/Classes/SubHandler/SubHandler0.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler0)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler0;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
5984
ios/Classes/SubHandler/SubHandler0.m
Normal file
5984
ios/Classes/SubHandler/SubHandler0.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler1.h
Normal file
13
ios/Classes/SubHandler/SubHandler1.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler1)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler1;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
6367
ios/Classes/SubHandler/SubHandler1.m
Normal file
6367
ios/Classes/SubHandler/SubHandler1.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler2.h
Normal file
13
ios/Classes/SubHandler/SubHandler2.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler2)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler2;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
4388
ios/Classes/SubHandler/SubHandler2.m
Normal file
4388
ios/Classes/SubHandler/SubHandler2.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler3.h
Normal file
13
ios/Classes/SubHandler/SubHandler3.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler3)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler3;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
4987
ios/Classes/SubHandler/SubHandler3.m
Normal file
4987
ios/Classes/SubHandler/SubHandler3.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler4.h
Normal file
13
ios/Classes/SubHandler/SubHandler4.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler4)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler4;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
4818
ios/Classes/SubHandler/SubHandler4.m
Normal file
4818
ios/Classes/SubHandler/SubHandler4.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler5.h
Normal file
13
ios/Classes/SubHandler/SubHandler5.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler5)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler5;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
4651
ios/Classes/SubHandler/SubHandler5.m
Normal file
4651
ios/Classes/SubHandler/SubHandler5.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler6.h
Normal file
13
ios/Classes/SubHandler/SubHandler6.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler6)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler6;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
3611
ios/Classes/SubHandler/SubHandler6.m
Normal file
3611
ios/Classes/SubHandler/SubHandler6.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler7.h
Normal file
13
ios/Classes/SubHandler/SubHandler7.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler7)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler7;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
3871
ios/Classes/SubHandler/SubHandler7.m
Normal file
3871
ios/Classes/SubHandler/SubHandler7.m
Normal file
File diff suppressed because it is too large
Load Diff
13
ios/Classes/SubHandler/SubHandler8.h
Normal file
13
ios/Classes/SubHandler/SubHandler8.h
Normal file
@ -0,0 +1,13 @@
|
||||
//////////////////////////////////////////////////////////
|
||||
// GENERATED BY FLUTTIFY. DO NOT EDIT IT.
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#import "AmapMapFluttifyPlugin.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface AmapMapFluttifyPlugin (SubHandler8)
|
||||
- (NSDictionary<NSString*, Handler>*) getSubHandler8;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
1289
ios/Classes/SubHandler/SubHandler8.m
Normal file
1289
ios/Classes/SubHandler/SubHandler8.m
Normal file
File diff suppressed because it is too large
Load Diff
44
ios/amap_map_fluttify.podspec
Normal file
44
ios/amap_map_fluttify.podspec
Normal file
@ -0,0 +1,44 @@
|
||||
#
|
||||
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
|
||||
#
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'amap_map_fluttify'
|
||||
s.version = '0.0.1'
|
||||
s.summary = 'An `Amap` Map Component, Powered By `Fluttify`, A Compiler Generating Dart Bindings For Native SDK.'
|
||||
s.description = <<-DESC
|
||||
A new flutter plugin project.
|
||||
DESC
|
||||
s.homepage = 'https://github.com/fluttify-project'
|
||||
s.license = { :file => '../LICENSE' }
|
||||
s.author = { 'yohom' => 'yohombao@qq.com' }
|
||||
s.source = { :path => '.' }
|
||||
s.source_files = 'Classes/**/*'
|
||||
s.public_header_files = ['Classes/**/*.h', 'Vendors/*.h'] # 只接收顶层的.h文件, 防止framework下面的.h文件被包含
|
||||
s.dependency 'Flutter'
|
||||
s.dependency 'foundation_fluttify'
|
||||
# flutter plugin dependency
|
||||
|
||||
# sdk dependency
|
||||
s.dependency 'AMap3DMap-NO-IDFA', '9.2.1'
|
||||
|
||||
s.static_framework = true
|
||||
s.ios.deployment_target = '11.0'
|
||||
# include project framework
|
||||
s.vendored_frameworks = 'Vendors/*.framework'
|
||||
# include project .a
|
||||
s.vendored_libraries = 'Vendors/*.a'
|
||||
# ios system framework
|
||||
s.frameworks = [
|
||||
|
||||
]
|
||||
# ios system library
|
||||
s.libraries = [
|
||||
|
||||
]
|
||||
# resources
|
||||
s.resources = 'Vendors/**/*.bundle'
|
||||
# s.resource_bundles = {
|
||||
# 'amap_map_fluttify' => ['Vendors/*.framework/*.bundle']
|
||||
# }
|
||||
end
|
||||
|
Reference in New Issue
Block a user