https://github.com/philip-bui/mapkit-search-view
Apple Map's bottom sheet with animated gestures and state-machine transitions & scrolling.
https://github.com/philip-bui/mapkit-search-view
geocode geosearch ios mapkit mapkit-search
Last synced: 12 months ago
JSON representation
Apple Map's bottom sheet with animated gestures and state-machine transitions & scrolling.
- Host: GitHub
- URL: https://github.com/philip-bui/mapkit-search-view
- Owner: philip-bui
- License: mit
- Created: 2019-02-16T04:52:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-04-12T13:19:21.000Z (almost 2 years ago)
- Last Synced: 2025-03-28T01:25:51.234Z (about 1 year ago)
- Topics: geocode, geosearch, ios, mapkit, mapkit-search
- Language: Swift
- Homepage:
- Size: 1.53 MB
- Stars: 17
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MapKit Search View
[](https://travis-ci.org/philip-bui/mapkit-search-view)
[](https://codecov.io/gh/philip-bui/mapkit-search-view)
[](http://cocoapods.org/pods/MapKitSearchView)
[](https://github.com/Carthage/Carthage)
[](http://cocoapods.org/pods/MapKitSearchView)
[](https://github.com/philip-bui/mapkit-search-view/blob/master/LICENSE)
An implementation of Apple's Map search view.
- Animation between states and keyboard events.
- Single gesture to scroll table view or drag down sheet.
- Map user tracking (Follow, Follow with Heading).
- Compass on non-north headings.
- Customizable colors, search options.
## Requirements
- iOS 11.0+
- Xcode 10.3+
- Swift 4.2+
## Installation
### CocoaPods
[CocoaPods](https://cocoapods.org) is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate MapKit Search View into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
pod 'MapKitSearchView'
```
### Carthage
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate MapKit Search View into your Xcode project using Carthage, specify it in your `Cartfile`:
```ogdl
github "philip-bui/mapkit-search-view"
```
### Swift Package Manager
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but MapKit Search View does support its use on supported platforms.
Once you have your Swift package set up, adding MapKit Search View as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
```swift
dependencies: [
.package(url: "https://github.com/philip-bui/mapkit-search-view.git", from: "1.0.0"))
]
```
## Usage
```swift
import MapKitSearchView
let mapKitSearch = MapKitSearchViewController(delegate: self)
mapKitSearch.tintColor = nil // Tints the close, userTracking and searchBar cursor colors.
mapKitSearch.markerTintColor = nil // Tints map annotations and mapItem results.
mapKitSearch.completionEnabled = true // Enables search completions as you type.
mapKitSearch.geocodeEnabled = true // Enables geocoding when tapping on a map at street levels.
mapKitSearch.userLocationRequest = .authorizedAlways // Requests location permission on view load.
```
## Improvements
- Tablet / Landscape UI.
- Additional information on duplicate place names.
- Strings Localization.
- Optional delegate methods to customize UI views (Search Bar, Table View rows).
- Add Bottom Sheet states (collapsed, peek, expanded) for users to choose.
## License
MapKit Search View is available under the MIT license. [See LICENSE](https://github.com/philip-bui/mapkit-search-view/blob/master/LICENSE) for details.


