在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):shmidt/GooglePlacesSearchController开源软件地址(OpenSource Url):https://github.com/shmidt/GooglePlacesSearchController开源编程语言(OpenSource Language):Swift 93.1%开源软件介绍(OpenSource Introduction):GooglePlacesSearchControllerA simple Google Places API autocompleting address search controller (subclass of GooglePlacesSearchController is 100% Swift 4, and is a fork of GooglePlacesAutocomplete. No attempt has been made to integrate MapKit since displaying Google Places on a non-Google map is against their terms of service. ScreenshotsRequirementsiOS 8.0+ Xcode 8.0+ / Swift 4.0 InstallationGooglePlacesSearchController is available through CocoaPods. To install it, simply add the following line to your Podfile: pod 'GooglePlacesSearchController' UsageTo run the example project, clone the repo, and run To integrate let controller = GooglePlacesSearchController(delegate: self,
apiKey: GoogleMapsAPIServerKey,
placeType: .address
// Optional: coordinate: CLLocationCoordinate2D(latitude: 55.751244, longitude: 37.618423),
// Optional: radius: 10,
// Optional: strictBounds: true,
// Optional: searchBarPlaceholder: "Start typing..."
) And then add controller's searchbar To get selected place use extension ViewController: GooglePlacesAutocompleteViewControllerDelegate {
func viewController(didAutocompleteWith place: PlaceDetails) {
print(place.description)
placesSearchController.isActive = false
}
} AuthorDmitry Shmidt with help of other contributors. License
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论