Latest 1.2
Homepage https://github.com/rushisangani/MapHelperKit
License MIT
Platforms ios 9.0, requires ARC
Authors

MapHelperKit provides an elegant way to show locations or directions in Google Maps or Apple Maps.

Alt text
Alt text
Alt text

Features

  • Easiest way to show locations or directions in map.
  • MapHelperKit opens Apple Maps automatically, if Google Map is not installed on the device.
  • Default mode asks user to show address in Google Map or Apple Map.
  • Show directions with different direction mode.

Requirements

  • iOS 9.0+
  • Xcode 8.3+
  • Swift 4.0

Installation

CocoaPods

pod 'MapHelperKit'
or
pod 'MapHelperKit', '~> 1.2'

Usage

Note: – To open Google Maps from iOS App please include following in your info.plist

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>comgooglemaps</string>
</array>

Show Place In Map

let address = "One Infinite Loop Cupertino, CA"
let mapHelper = MapHelper(placeName: address)
mapHelper.openInMap()
  • Provide MapViewMode
    mapHelper.mapViewMode = .satellite    // Default is StandardView
  • Provide Zoom Level

    mapHelper.zoomLevel = 10             // Default is 14
  • Provide Map Type
    mapHelper.mapType = .googleMap      // Default is '.default', let's ask user to select map to open

Show Directions In Map

  • Show directions from Current Location
let address = "One Infinite Loop Cupertino, CA"
let directionHelper = DirectionHelper(destination: address)
directionHelper.showDirection()
  • Show Direction from Source to Destination
let address1 = "One Infinite Loop Cupertino, CA"
let address2 = "Apple Fitness Center, 10627 Bandley Dr, Cupertino, CA"
let directionHelper = DirectionHelper(source: address1, destination: address2)
directionHelper.showDirection()
  • Provide Direction Mode
    directionHelper.directionMode = .walking      // Default is 'Driving'

Example

See Example for more details.

License

MapHelperKit is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "MapHelperKit",
    "version": "1.2",
    "summary": "MapHelperKit provides an elegant way to show locations or directions in Google Maps or Apple Maps.",
    "description": "MapHelperKit provides easiest way to show different places in Maps. It also provides directions API to show in Apple Maps or Google Maps.",
    "homepage": "https://github.com/rushisangani/MapHelperKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Rushi Sangani": "[email protected]"
    },
    "source": {
        "git": "https://github.com/rushisangani/MapHelperKit.git",
        "tag": "1.2"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "MapHelperKit/**/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This