diff --git a/README.md b/README.md index 31968dd..20f83d3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Build Status](https://travis-ci.org/raphaelmor/Polyline.svg?branch=master)](https://travis-ci.org/raphaelmor/Polyline) [![CocoaPods](https://img.shields.io/cocoapods/v/Polyline.svg)](http://cocoadocs.org/docsets/Polyline) -![](https://img.shields.io/badge/Swift-2.0-green.svg) +![](https://img.shields.io/badge/Swift-3.0-green.svg) [![Licence](http://img.shields.io/badge/Licence-MIT-lightgrey.svg)](https://github.com/raphaelmor/Polyline/blob/master/LICENSE.txt) Polyline encoder / decoder in Swift @@ -29,7 +29,7 @@ Polyline encoder / decoder in Swift - Continuous integration with [Travis CI](http://travis-ci.org) - CocoaPod available -### Planned for future releases +### Planned for future releases - Convert to `MKPolyline` - Convert to `GMSPolyline` @@ -37,13 +37,16 @@ Polyline encoder / decoder in Swift - Filter locations available at a specific level ### Planned when support is available : -- Code Coverage with [Coveralls](https://coveralls.io) +- Code Coverage with [Coveralls](https://coveralls.io) ## Requirements -- Xcode 7+ +- Xcode 8+ - iOS 8.0+ / Mac OS X 10.10+ / tvOS 9.0+ / watchOS 2.0+ +- Swift 3.0 + +Note: The last version to support Swift 2.3 is the 3.x series. 4.0 will only support Swift 3.x. --- @@ -55,14 +58,14 @@ To use this library in your project you can use CocoaPods, Carthage, and/or inte You can integrate Polyline in your `Podfile` like this: ``` -pod 'Polyline', '~> 3.0' +pod 'Polyline', '~> 4.0' ``` ### Carthage You can integrate Polyline in your `Cartfile` like this: ``` -github "raphaelmor/Polyline" ~> 3.0 +github "raphaelmor/Polyline" ~> 4.0 ``` ### Manual @@ -75,6 +78,7 @@ github "raphaelmor/Polyline" ~> 3.0 ### Polyline Encoding Using `[CLLocationCoordinate2D]` (recommended) : + ```swift let coordinates = [CLLocationCoordinate2D(latitude: 40.2349727, longitude: -3.7707443), CLLocationCoordinate2D(latitude: 44.3377999, longitude: 1.2112933)] @@ -99,7 +103,7 @@ let encodedPolyline: String = polyline.encodedPolyline let encodedPolyline: String = encodeLocations(locations) ``` -You can encode levels too : +You can encode levels too : ```swift let levels: [UInt32] = [0,1,2,255] @@ -146,7 +150,7 @@ let levels: [UInt32]? = decodeLevels("BA") ### Polyline Precision -Default precision is 1e5 : 0.12345 (5 digit precision used by Google), but you can specify your own precision in all API methods (and functions). +Default precision is 1e5 : 0.12345 (5 digit precision used by Google), but you can specify your own precision in all API methods (and functions). ```swift // OSRM uses a 6 digit precision @@ -154,7 +158,7 @@ let polyline = Polyline(encodedPolyline: "ak{hRak{hR", precision: 1e6) ``` - + ## Notes This library tries to have consistent results with polylines generated by the [Google Maps iOS SDK](https://developers.google.com/maps/documentation/ios/). The online tool for [encoding polylines](https://developers.google.com/maps/documentation/utilities/polylineutility) has some minor inconsistencies regarding rounding (for example, 0.000015 is rounded to 0.00002 for latitudes, but 0.00001 for longitudes). @@ -163,8 +167,8 @@ This codes tries to adhere to the [GitHub Swift Style Guide](https://github.com/ ## Contributors -- [Raphaël Mor](http://github.com/raphaelmor) ([@raphaelmor](https://twitter.com/raphaelmor)) : Creator -- [Tom Taylor](https://tomtaylor.co.uk) : Maintainer +- [Raphaël Mor](http://github.com/raphaelmor) ([@raphaelmor](https://twitter.com/raphaelmor)): Creator +- [Tom Taylor](https://tomtaylor.co.uk): Maintainer ## License Polyline is released under an MIT license. See [LICENSE.txt](https://github.com/raphaelmor/Polyline/blob/master/LICENSE.txt) for more information.