提交 25cd4a92 authored 作者: 祁增奎's avatar 祁增奎

1、导航和地图冲突问题解决

2、增加检测是否在覆盖区域判断方法
上级 0a08742e
......@@ -6,7 +6,7 @@
//
#import "AMapFlutterFactory.h"
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
#import "AMapViewController.h"
@implementation AMapFlutterFactory {
......
......@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -5,7 +5,7 @@
// Created by lly on 2020/11/5.
//
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -5,7 +5,7 @@
// Created by lly on 2020/10/30.
//
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -5,7 +5,7 @@
// Created by lly on 2020/11/9.
//
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -5,7 +5,7 @@
// Created by lly on 2020/11/12.
//
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -5,7 +5,7 @@
// Created by lly on 2020/11/12.
//
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -5,7 +5,7 @@
// Created by lly on 2020/11/9.
//
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -5,7 +5,7 @@
// Created by lly on 2020/11/7.
//
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -6,7 +6,7 @@
//
#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
#import <CoreLocation/CoreLocation.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -6,7 +6,7 @@
//
#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
#import <CoreLocation/CoreLocation.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -12,6 +12,7 @@
#import "MAPolygonRenderer+Flutter.h"
#import "FlutterMethodChannel+MethodCallDispatch.h"
@interface AMapPolygonController ()
@property (nonatomic,strong) NSMutableDictionary<NSString*,AMapPolygon*> *polygonDict;
......@@ -50,10 +51,31 @@
}
result(nil);
}];
[_methodChannel addMethodName:@"polygon#containsPoint" withHandler:^(FlutterMethodCall * _Nonnull call, FlutterResult _Nonnull result) {
id point = call.arguments[@"point"];
if (![point isKindOfClass:[NSArray class]]) {
result(false);
return;
}
NSArray *locationArray = (NSArray *)point;
if (locationArray.count < 2) {
result(false);
return;
}
CLLocationDegrees latitude = [locationArray[0] doubleValue];
CLLocationDegrees longitude = [locationArray[1] doubleValue];
CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(latitude, longitude);
MAMapPoint mapPoint = MAMapPointForCoordinate(coordinate);
NSString *_id = call.arguments[@"id"];
AMapPolygon* polygon = [weakSelf polygonForId:_id];
result(@(MAPolygonContainsPoint(mapPoint,polygon.polygon.points, polygon.polygon.pointCount)));
}];
}
return self;
}
- (nullable AMapPolygon *)polygonForId:(NSString *)polygonId {
return _polygonDict[polygonId];
}
......
......@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <Flutter/Flutter.h>
#import <MAMapKit/MAMapKit.h>
#include <AMapNaviKit/MAMapKit.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -16,7 +16,7 @@ A new Flutter plugin.
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.dependency 'AMap3DMap'
s.dependency 'AMapNavi'
s.dependency 'AMapSearch'
s.static_framework = true
s.platform = :ios, '8.0'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论