/BVOfflineMapManager

A simple and fast solution for downloading and saving maps in given radius and zoom levels

Primary LanguageSwiftMIT LicenseMIT

BVOfflieManager-simple and fast

BVOfflineMapManager

[![CI Status](http://img.shields.io/travis/Victor Barskov/BVOfflineMapManager.svg?style=flat)](https://travis-ci.org/Victor Barskov/BVOfflineMapManager) Version Swift License Platform

Example

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

Requirements

iOS 8.0+, Swift 2.3, Swift 3

IMPORTANT:

Do not forget to Allow Arbitrary Loads for App Transport Security Settings in info.plist

Usage

Swift 2.3, Swift 3:

To start maps downloading and saving call following method with passing of initial coordinate lat and lon, radius and zoom:

BVOfflineMapManager.shared.startDownloading(lat: Double, lon: Double, zoom: CustomMapZoom, radius: CustomMapRadius)

To reload map tiles from online to offline and back call:

BVOfflineMapManager.shared.reloadTileOverlay(mapView: MKMapView, overlayType: CustomMapTileOverlayType?)

To clear cached maps to free disk space call:

BVOfflineMapManager.shared.clearMapCache(callBack: (Bool) -> ())

Installation

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

Swift 3

pod 'BVOfflineMapManager', '0.1.2'

Swift 2.3

pod 'BVOfflineMapManager', '0.1.0'

Author

Victor Barskov, victor.barskov@gmail.com

References:

License

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