Latest 1.0.2
Homepage https://github.com/michalziman/mz-location-picker
License MIT
Platforms ios 10.0
Frameworks UIKit, MapKit, CoreData
Authors

Simple to use location picker. As for users, so for developers.

Default History Search Customized
MZLocationPicker MZLocationPicker MZLocationPicker MZLocationPicker

Version
License
Platform

Features

  • Reverse geocoding for location chosen in map
  • Location textual search
  • History of chosen locations
  • Multiple map types
  • Custom annotations/pins
  • Custom tint color
  • Support for localizations
  • Landscape as well as portrait orientation

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

MZLocationPicker is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MZLocationPicker"

Usage

For simple usage just implement MZLocationPickerDelegate methods and present picker like this:

let picker = MZLocationPickerController()
picker.delegate = self
present(picker, animated: true, completion: nil)

However, you can also customize the picker a bit more:

let picker = MZLocationPickerController()
picker.delegate = self
picker.tintColor = .purple
picker.annotation.image = #imageLiteral(resourceName: "custom_pin")
picker.annotation.centerOffset = CGPoint(x: 0, y: 24)
picker.mapType = .satellite
picker.translator = self
present(picker, animated: true, completion: nil)

Known Issues

  • When map type is flyover, search is not displayed correctly. For best functionality, avoid using flyover map types.

Author

Michal Ziman, [email protected]

License

MZLocationPicker is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MZLocationPicker",
    "version": "1.0.2",
    "summary": "MZLocationPicker allows user to select one exact location.",
    "description": "This location picker allows user to choose location by tapping in map view, searching for it by name or address or by selecting recently picked location.nIt presents: reverse geocoding for location chosen in map, location search, history of chosen locations, multiple map types, custom pins, custom tint color, support for translations using delegate, landscape as well as portrait orientation.nIt is designed to match general picker design such as the one used in Contact picker.nIt is intended to be presented modally, though it is not necessary.",
    "homepage": "https://github.com/michalziman/mz-location-picker",
    "screenshots": [
        "https://raw.githubusercontent.com/michalziman/mz-location-picker/master/screenshot1.png",
        "https://raw.githubusercontent.com/michalziman/mz-location-picker/master/screenshot2.png",
        "https://raw.githubusercontent.com/michalziman/mz-location-picker/master/screenshot3.png",
        "https://raw.githubusercontent.com/michalziman/mz-location-picker/master/screenshot4.png"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Michal Ziman": "[email protected]"
    },
    "source": {
        "git": "https://github.com/michalziman/mz-location-picker.git",
        "tag": "1.0.2"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "MZLocationPicker/**/*.swift",
    "resources": [
        "MZLocationPicker/*.xib",
        "MZLocationPicker/*.xcassets",
        "MZLocationPicker/MZLocationPickerHistory.xcdatamodeld"
    ],
    "frameworks": [
        "UIKit",
        "MapKit",
        "CoreData"
    ],
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This