• Stars
    star
    407
  • Rank 106,183 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 10 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Map manager is a MapKit wrapper in Swift to provide route direction drawing

MapManager

Map manager is a MapKit wrapper to provide route direction drawing written entirely in Swift

Updated for XCode 7.0 and iOS 9.0.1

Features:

  1. Closure support

  2. Get directions using Apple service

  3. Get directions using Google service


Try this too: https://github.com/varshylmobile/LocationManager


Screenshot

Currently these methods are available

Screenshot


Screenshot

Sample code

Directions using Apple service

var latOrigin = 37.331789
var lngOrigin = -122.029620
var coordinateOrigin = CLLocationCoordinate2D(latitude: latOrigin, longitude: lngOrigin)
var latDestination = 37.231789
var lngDestination = -122.029620
var coordinateDestination = CLLocationCoordinate2D(latitude: latDestination, longitude: lngDestination)
    
mapManager.directions(from: coordinateOrigin, to: coordinateDestination) { (route, directionInformation, boundingRegion, error) -> () in
        
    if (error? != nil) {
            
        println(error!)
    }else{
            
        if let web = self.mapView?{
                
            dispatch_async(dispatch_get_main_queue()) {
                    
                web.addOverlay(route!)
                web.setVisibleMapRect(boundingRegion!, animated: true)
                    
                }
                
            }
        }
        
    }

Directions using Google service

var origin = "Toronto"
var destination =  "Montreal"
    
mapManager.directionsUsingGoogle(from: origin, to: destination) { (route, directionInformation, boundingRegion, error) -> () in
        
    if(error != nil){
            
        println(error!)
    }else{
            
        if let web = self.mapView?{
                
            dispatch_async(dispatch_get_main_queue()) {
                web.addOverlay(route!)
                web.setVisibleMapRect(boundingRegion!, animated: true)
            	}
                
        	}
            
    	}
	}

Roadmap

  • Refactor code and use MKGeodesicPolyline
  • Add few more features

Contributors

All contributors will receive virtual high fives from me and for the heck of it lets forget you are a south paw

enter image description here


Other Repos you might like

  1. https://github.com/varshylmobile/LocationManager

CLLocationManager wrapper in Swift, performs location update, geocoding and reverse geocoding using Apple and Google service

  1. https://github.com/varshylmobile/VMXMLParser

NSXMLParser wrapper in Swift

  1. https://github.com/varshylmobile/RateMyApp

RateMyApp is a Swift class to provide gentle reminders to app user to rate your app

  1. https://github.com/varshylmobile/TableViewCellFlip

Vertical and Horizontal flip animation for table view cell


Contact Us

Have any questions or suggestions feel free to write at [email protected] (Jimmy Jose) http://www.varshylmobile.com/


License

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Bitdeli Badge

More Repositories

1

LocationManager

CLLocationManager wrapper in Swift, performs location update, geocoding and reverse geocoding using Apple and Google service
Swift
710
star
2

RateMyApp

RateMyApp is a Swift class to provide gentle reminders to app user to rate your app
Swift
224
star
3

TableViewCellFlip

Vertical and Horizontal flip animation for table view cell
Objective-C
115
star
4

VMXMLParser

NSXMLParser wrapper in Swift
Swift
55
star
5

VMFloatLabel

Swift based UITextField subclass with floating labels
Swift
49
star
6

Hamburger

Hamburger button transition in ObjC
Objective-C
12
star
7

CloudQRScan

CloudQRScan is .com for ME, itโ€™s worldโ€™s first cloud based QR application that lets you save all the information that one would want to have on their personal website, thus no need to have personal website โ€“ just get your SMART QR from www.cloudqrscan.com.
Objective-C
5
star
8

VMNumberScrollAnimatedView

Swift port of JTNumberScrollAnimatedView
Swift
4
star
9

APNS

PHP Sample code for APNS
PHP
3
star
10

StickerShopDesign

Sticker Shop Design -> Inspired by dribbble shot by Ramotion
3
star
11

ZoomSDKJWTGenerator

Generate Zoom JWT for Zoom Android SDK,Zoom iOS SDK, Zoom Mac SDK, Zoom Windows SDK, Zoom Windows SDK (C# Wrapper), Zoom Electron SDK, Zoom SDK Ionic, Zoom SDK Cordova Plugin
Python
2
star
12

iVoicePhoto

iVoicePhoto is a fun app that lets you browse your phone gallery with voice commands.
1
star
13

WIE

Extract all images from weblink
Objective-C
1
star
14

VoiceForFlickr

We call this adding emotions to pictures. Add voice to Flickr images.
Objective-C
1
star
15

VMNotificationView

Custom notification view
JavaScript
1
star
16

SwiftBook

Simple book search code written in Swift
Objective-C
1
star
17

VMPinterest

Custom framework for pinning images to Pinterest, easily integrates with any app
Objective-C
1
star
18

Snapworks

1
star