GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lminhtm/LMGeocoderSwift: Simple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
.swiftpm/xcode/package.xcworkspace
.swiftpm/xcode/package.xcworkspace
 
 
Example
Example
 
 
LMGeocoderSwift
LMGeocoderSwift
 
 
Screenshots
Screenshots
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
LMGeocoderSwift.podspec
LMGeocoderSwift.podspec
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 
_Pods.xcodeproj
_Pods.xcodeproj
 
 

Repository files navigation

LMGeocoderSwift

LMGeocoderSwift is a simple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.

CI Status Version License Platform

Features

  • Wrapper for Geocoding and Reverse geocoding with blocked-based coding.
  • Use both Google Geocoding API and Apple iOS Geocoding Framework.

Requirements

  • iOS 8.0 or higher
  • Swift 5.0

Installation

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

pod 'LMGeocoderSwift'

Objective-C Version

https://github.com/lminhtm/LMGeocoder

Usage

Geocoding

Geocoder.shared.geocodeAddressString(addressString, service: .apple, alternativeService: .google) { (results, error) in
                
    // Update UI
    if let address = results?.first, error == nil {
        DispatchQueue.main.async {
            self.coordinateLabel.text = "(\(address.coordinate?.latitude ?? 0), \(address.coordinate?.longitude ?? 0))"
        }
    }
}

Reverse Geocoding

Geocoder.shared.reverseGeocodeCoordinate(coordinate, service: .apple, alternativeService: .google) { (results, error) in
                
    // Update UI
    if let address = results?.first, error == nil {
        DispatchQueue.main.async {
            self.addressLabel.text = address.formattedAddress ?? "-"
        }
    }
}

Cancel Geocode

Geocoder.shared.cancelGeocode()

Example

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

License

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

Author

Minh Nguyen

  • https://github.com/lminhtm
  • [email protected]

About

Simple wrapper for geocoding and reverse geocoding, using both Google Geocoding API and Apple iOS Geocoding Framework.

Resources

Readme
MIT license
Activity

Stars

21 stars

Watchers

4 watching

Forks

13 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.