Skip to content

只有一个类,一行代码通过地图获取地址信息,可搜索地址

License

Notifications You must be signed in to change notification settings

uxiume/AddressFromMap

Repository files navigation

AddressFromMap

通过地图获取地址信息,可搜索,简单的一个ViewController

使用方法

AddressFromMapViewController *vc = [[AddressFromMapViewController alloc] init];
    vc.selectedEvent = ^(CLLocationCoordinate2D coordinate, NSString *addressName, NSString *province, NSString *city, NSString *distract, NSString *address) {
        //DLog(@"输出🍀 %@%@%@%@",province,city,distract,address);
        //DLog(@"输出🍀 %@",address);
        self.addressName.text = addressName;
        self.aera.text = [NSString stringWithFormat:@"%@ | %@ | %@",province,city,distract];
        self.address.text = address;
        self.coordinate.text = [NSString stringWithFormat:@"%f\n%f",coordinate.latitude,coordinate.longitude];
    };
    [self.navigationController pushViewController:vc animated:YES];

示例

About

只有一个类,一行代码通过地图获取地址信息,可搜索地址

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published