Skip to content

Commit

Permalink
Rename to MapboxDirections and add support for Swift Package Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
frederoni committed Apr 4, 2019
1 parent 44b9a79 commit be1bc31
Show file tree
Hide file tree
Showing 73 changed files with 166 additions and 66 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Carthage/Build
Carthage/Checkouts
/build
/documentation
./build
File renamed without changes.
143 changes: 77 additions & 66 deletions MapboxDirections.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "Polyline",
"repositoryURL": "/Users/fredrik/Workspace/mapbox/Polyline",
"state": {
"branch": "fred/spm4.2",
"revision": "4b4b4957549f7d0f1d59e6b3c662234402717de9",
"version": null
}
}
]
},
"version": 1
}
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "MapboxDirections",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "MapboxDirections",
targets: ["MapboxDirections"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "../Polyline", .branch("fred/spm4.2"))
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "MapboxDirections",
dependencies: ["Polyline"]),
.testTarget(
name: "MapboxDirectionsTests",
dependencies: ["MapboxDirections"]),
]
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import Foundation


typealias JSONDictionary = [String: Any]

/// Indicates that an error occurred in MapboxDirections.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Foundation
import Polyline
import CoreLocation


/**
Maximum length of an HTTP request URL for the purposes of switching from GET to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
import Polyline
import CoreLocation


/**
A `DirectionsResult` represents a result returned from either the Mapbox Directions service.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import CoreLocation


/**
A single cross street along a step.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation


public typealias LaneIndication = MBLaneIndication

extension LaneIndication: CustomStringConvertible {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import Foundation


/**
A component that represents a lane representation of an instruction.
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Foundation
import CoreLocation
import Polyline


/**
A `Route` object defines a single route that the user can follow to visit a series of waypoints in order. The route object includes information about the route, such as its distance and expected travel time. Depending on the criteria used to calculate the route, the route object may also include detailed turn-by-turn instructions.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Foundation
import CoreLocation
import Polyline


/**
A `RouteLeg` object defines a single leg of a route between two waypoints. If the overall route has only two waypoints, it has a single `RouteLeg` object that covers the entire route. The route leg object includes information about the leg, such as its name, distance, and expected travel time. Depending on the criteria used to calculate the route, the route leg object may also include detailed turn-by-turn instructions.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import Foundation
import CoreLocation


/**
A `RouteOptions` object is a structure that specifies the criteria for results returned by the Mapbox Directions API.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Foundation
import CoreLocation
import Polyline


/**
A `TransportType` specifies the mode of transportation used for part of a route.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import CoreLocation


/**
An instruction about an upcoming `RouteStep`’s maneuver, optimized for speech synthesis.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import CoreLocation


/**
The contents of a banner that should be displayed as added visual guidance for a route. The banner instructions are children of the steps during which they should be displayed, but they refer to the maneuver in the following step.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import CoreLocation


/**
A visual instruction banner contains all the information necessary for creating a visual cue about a given `RouteStep`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import Foundation
import CoreLocation


/**
A `Waypoint` object indicates a location along a route. It may be the route’s origin or destination, or it may be another location that the route visits. A waypoint object indicates the location’s geographic location along with other optional information, such as a name or the user’s direction approaching the waypoint. You create a `RouteOptions` object using waypoint objects and also receive waypoint objects in the completion handler of the `Directions.calculate(_:completionHandler:)` method.
*/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import Foundation
import CoreLocation
import Polyline

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Foundation
import CoreLocation


/**
A `MatchOptions` object is a structure that specifies the criteria for results returned by the Mapbox Map Matching API.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import Foundation
import CoreLocation


/**
A `Tracepoint` represents a location matched to the road network.
*/
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit be1bc31

Please sign in to comment.