Git Product home page Git Product logo

maphelperkit's Introduction

MapHelperKit

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.

maphelperkit's People

Contributors

rushisangani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.