Skip to content

Commit

Permalink
Updated Sample project for v1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
poulpix committed Jun 23, 2016
1 parent e6ea681 commit 3e4b9db
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion PXGoogleDirections/PXGoogleDirectionsRoute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class PXGoogleDirectionsRoute: NSObject {
- parameter approximate: `true` if the route should be drawn using rough directions, `false` otherwise ; `false` by default but has a performance impact
- parameter strokeColor: The optional route stroke color
- parameter strokeWidth: The optional route stroke width
- returns: The resulting `GMSPolyline` object that was drawn to the map
- returns: The resulting `GMSPolyline` objects that were drawn to the map
*/
public func drawOnMap(map: GMSMapView, approximate: Bool = false, strokeColor: UIColor = UIColor.redColor(), strokeWidth: Float = 2.0) -> [GMSPolyline] {
var polylines = [GMSPolyline]()
Expand Down
18 changes: 9 additions & 9 deletions Sample/PXGoogleDirectionsSample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 7A12EFA11AAC65710070BA73 /* Build configuration list for PBXNativeTarget "PXGoogleDirectionsSample" */;
buildPhases = (
2993869EDE9EDB14F9F4AFE4 /* 📦 Check Pods Manifest.lock */,
2993869EDE9EDB14F9F4AFE4 /* [CP] Check Pods Manifest.lock */,
7A12EF7E1AAC65710070BA73 /* Sources */,
7A12EF7F1AAC65710070BA73 /* Frameworks */,
7A12EF801AAC65710070BA73 /* Resources */,
7EC7EFC8C2EE5BF130AC3C2A /* 📦 Embed Pods Frameworks */,
E05481DBC90E221591503D21 /* 📦 Copy Pods Resources */,
7EC7EFC8C2EE5BF130AC3C2A /* [CP] Embed Pods Frameworks */,
E05481DBC90E221591503D21 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -258,44 +258,44 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
2993869EDE9EDB14F9F4AFE4 /* 📦 Check Pods Manifest.lock */ = {
2993869EDE9EDB14F9F4AFE4 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Check Pods Manifest.lock";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
7EC7EFC8C2EE5BF130AC3C2A /* 📦 Embed Pods Frameworks */ = {
7EC7EFC8C2EE5BF130AC3C2A /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Embed Pods Frameworks";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PXGoogleDirectionsSample/Pods-PXGoogleDirectionsSample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E05481DBC90E221591503D21 /* 📦 Copy Pods Resources */ = {
E05481DBC90E221591503D21 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "📦 Copy Pods Resources";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
6 changes: 3 additions & 3 deletions Sample/PXGoogleDirectionsSample/ResultsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ class ResultsViewController: UIViewController {
nextButton.enabled = (routeIndex < (results).count - 1)
routesLabel.text = "\(routeIndex + 1) of \((results).count)"
mapView.clear()
for i in 0 ..< (results).count {
for i in 0 ..< results.count {
if i != routeIndex {
results[i].drawOnMap(mapView, strokeColor: UIColor.lightGrayColor(), strokeWidth: 3.0)
results[i].drawOnMap(mapView, approximate: false, strokeColor: UIColor.lightGrayColor(), strokeWidth: 3.0)
}
}
mapView.animateWithCameraUpdate(GMSCameraUpdate.fitBounds(results[routeIndex].bounds, withPadding: 40.0))
results[routeIndex].drawOnMap(mapView, strokeColor: UIColor.purpleColor(), strokeWidth: 4.0)
results[routeIndex].drawOnMap(mapView, approximate: false, strokeColor: UIColor.purpleColor(), strokeWidth: 4.0)
results[routeIndex].drawOriginMarkerOnMap(mapView, title: "Origin", color: UIColor.greenColor(), opacity: 1.0, flat: true)
results[routeIndex].drawDestinationMarkerOnMap(mapView, title: "Destination", color: UIColor.redColor(), opacity: 1.0, flat: true)
directions.reloadData()
Expand Down
2 changes: 1 addition & 1 deletion Sample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ platform :ios, '8.0'
use_frameworks!

target 'PXGoogleDirectionsSample' do
pod 'PXGoogleDirections'
pod 'PXGoogleDirections', :git => 'https://github.com/poulpix/PXGoogleDirections.git', :commit => 'e6ea681876a72374d16951bb0cce35bb04c6eeca'
end

0 comments on commit 3e4b9db

Please sign in to comment.