fix map sdk

phiz_2.41.5.5
stewen 2023-08-14 18:51:27 +08:00
parent f2077784db
commit 98168c167e
2 changed files with 16 additions and 17 deletions

View File

@ -169,15 +169,14 @@ static NSString *kUserAnnotationId = @"FATUserAnnotationViewId";
}else { }else {
[localSearch startWithCompletionHandler:^(MKLocalSearchResponse *_Nullable response, NSError *_Nullable error) { [localSearch startWithCompletionHandler:^(MKLocalSearchResponse *_Nullable response, NSError *_Nullable error) {
//NSMutableArray *placeArrayM = [NSMutableArray array]; //NSMutableArray *placeArrayM = [NSMutableArray array];
if (placemark) { // if (placemark) {
FATMapPlace *place = [[FATMapPlace alloc] init]; // FATMapPlace *place = [[FATMapPlace alloc] init];
place.name = placemark.name; // place.name = placemark.name;
place.address = placemark.thoroughfare; // place.address = placemark.thoroughfare;
place.location = placemark.location; // place.location = placemark.location;
place.selected = YES; // place.selected = YES;
[self.dataArray addObject:place]; // [self.dataArray addObject:place];
} // }
for (MKMapItem *item in response.mapItems) { for (MKMapItem *item in response.mapItems) {
if (!item.isCurrentLocation) { if (!item.isCurrentLocation) {
FATMapPlace *place = [[FATMapPlace alloc] init]; FATMapPlace *place = [[FATMapPlace alloc] init];

View File

@ -106,14 +106,14 @@
[FATExtUtil getNearbyPlacesByCategory:@"All" coordinates:destCenter radius:1000 token:@"" [FATExtUtil getNearbyPlacesByCategory:@"All" coordinates:destCenter radius:1000 token:@""
completion:^(NSDictionary * _Nonnull dict) { completion:^(NSDictionary * _Nonnull dict) {
NSMutableArray *placeArrayM = [NSMutableArray array]; NSMutableArray *placeArrayM = [NSMutableArray array];
if (placemark) { // if (placemark) {
FATMapPlace *place = [[FATMapPlace alloc] init]; // FATMapPlace *place = [[FATMapPlace alloc] init];
place.name = placemark.name; // place.name = placemark.name;
place.address = placemark.thoroughfare; // place.address = placemark.thoroughfare;
place.location = placemark.location; // place.location = placemark.location;
place.selected = YES; // place.selected = YES;
[placeArrayM addObject:place]; // [placeArrayM addObject:place];
} // }
[placeArrayM addObjectsFromArray:[FATExtUtil convertPlaceDictToArray:dict]]; [placeArrayM addObjectsFromArray:[FATExtUtil convertPlaceDictToArray:dict]];
self.poiInfoListArray = [[NSMutableArray alloc] initWithArray: placeArrayM]; self.poiInfoListArray = [[NSMutableArray alloc] initWithArray: placeArrayM];