提交 5aca382b authored 作者: 袁静春's avatar 袁静春

提交:修改通道参数;

上级 f12fdab1
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
if ([@"searchPOI#keywords" isEqualToString:call.method]) { if ([@"searchPOI#keywords" isEqualToString:call.method]) {
@try { @try {
NSLog(@"---searchPOI#keywords--- arguments:%@", arguments);
if ([arguments.allKeys containsObject:@"keywords"]) { if ([arguments.allKeys containsObject:@"keywords"]) {
NSString *keywords = arguments[@"keywords"]; NSString *keywords = arguments[@"keywords"];
NSLog(@"---handleMethodCall--- keywords:%@", keywords); NSLog(@"---handleMethodCall--- keywords:%@", keywords);
...@@ -37,10 +39,11 @@ ...@@ -37,10 +39,11 @@
} }
} else if ([@"searchPOI#around" isEqualToString:call.method]) { } else if ([@"searchPOI#around" isEqualToString:call.method]) {
@try { @try {
NSLog(@"---searchPOI#around--- arguments:%@", arguments);
if ([arguments.allKeys containsObject:@"latitude"] && [arguments.allKeys containsObject:@"longitude"]) { if ([arguments.allKeys containsObject:@"latitude"] && [arguments.allKeys containsObject:@"longitude"]) {
NSString *latitude = arguments[@"latitude"]; NSString *latitude = arguments[@"latitude"];
NSString *longitude = arguments[@"longitude"]; NSString *longitude = arguments[@"longitude"];
NSLog(@"---handleMethodCall--- latitude:%@, longitude:%@", latitude, longitude);
[weakSelf aroundSearch:[latitude floatValue] Lng:[longitude floatValue]]; [weakSelf aroundSearch:[latitude floatValue] Lng:[longitude floatValue]];
} }
} @catch(FlutterError *e) { } @catch(FlutterError *e) {
...@@ -68,9 +71,9 @@ ...@@ -68,9 +71,9 @@
} @catch(FlutterError *e) { } @catch(FlutterError *e) {
result(e); result(e);
} }
} else if ([@"searchPOI#around#all" isEqualToString:call.method]) { } else if ([@"searchPOI#aroundAll" isEqualToString:call.method]) {
@try { @try {
NSLog(@"---handleMethodCall--- arguments:%@", arguments); NSLog(@"---searchPOI#aroundAll--- arguments:%@", arguments);
[weakSelf aroundSearchAll:arguments]; [weakSelf aroundSearchAll:arguments];
} @catch(FlutterError *e) { } @catch(FlutterError *e) {
result(e); result(e);
......
...@@ -44,7 +44,7 @@ class MethodChannelClxMapPoiSearch extends ClxMapPoiSearchPlatform { ...@@ -44,7 +44,7 @@ class MethodChannelClxMapPoiSearch extends ClxMapPoiSearchPlatform {
/// 周边搜索 /// 周边搜索
@override @override
Future<PoiResult?> aroundSearchAll(String keywords, double latitude, double longitude, String city) async { Future<PoiResult?> aroundSearchAll(String keywords, double latitude, double longitude, String city) async {
var searchPOIResult = await methodChannel.invokeMethod<dynamic>('searchPOI#around#all', <String, dynamic>{ var searchPOIResult = await methodChannel.invokeMethod<dynamic>('searchPOI#aroundAll', <String, dynamic>{
'keywords': keywords, 'keywords': keywords,
'latitude': latitude, 'latitude': latitude,
'longitude': longitude, 'longitude': longitude,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论