Skip to content

Commit

Permalink
Created a new Sample project for Carthage
Browse files Browse the repository at this point in the history
  • Loading branch information
poulpix committed Oct 10, 2017
1 parent 2207df0 commit 086e60b
Show file tree
Hide file tree
Showing 286 changed files with 10,854 additions and 1 deletion.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ To help getting you started, a sample project is also available in the "Sample"

It is designed to demo the main features of both the API and the SDK.

<img src="https://raw.githubusercontent.com/poulpix/PXGoogleDirections/master/Sample/Mockup1.png" width="400px"/><img src="https://raw.githubusercontent.com/poulpix/PXGoogleDirections/master/Sample/Mockup2.png" width="400px"/>
<img src="https://raw.githubusercontent.com/poulpix/PXGoogleDirections/master/Mockup1.png" width="400px"/><img src="https://raw.githubusercontent.com/poulpix/PXGoogleDirections/master/Mockup2.png" width="400px"/>

## 😱 Compatibility with Google pods
Since V1.3, PXGoogleDirections uses Google's latest branch of Google Maps iOS SDK, which has now been split into smaller, more modular frameworks. PXGoogleDirections has a dependency with three of them:
Expand Down
1 change: 1 addition & 0 deletions Sample-Carthage/Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "Poulpix/PXGoogleDirections"
1 change: 1 addition & 0 deletions Sample-Carthage/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "Poulpix/PXGoogleDirections" "1.3.1"
32 changes: 32 additions & 0 deletions Sample-Carthage/Carthage/Checkouts/PXGoogleDirections/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
Pods/
*.lock

# Sample
#
# Omit private information, like API keys in the sample project
Sample/Private/*.*
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
//
// GMSAddress.h
// Google Maps SDK for iOS
//
// Copyright 2014 Google Inc.
//
// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
// Service: https://developers.google.com/maps/terms
//

#import <CoreLocation/CoreLocation.h>

#if __has_feature(modules)
@import GoogleMapsBase;
#else
#import <GoogleMapsBase/GoogleMapsBase.h>
#endif
#import <GoogleMaps/GMSDeprecationMacros.h>

GMS_ASSUME_NONNULL_BEGIN

/**
* A result from a reverse geocode request, containing a human-readable address. This class is
* immutable and should be obtained via GMSGeocoder.
*
* Some of the fields may be nil, indicating they are not present.
*/
@interface GMSAddress : NSObject<NSCopying>

/** Location, or kLocationCoordinate2DInvalid if unknown. */
@property(nonatomic, readonly) CLLocationCoordinate2D coordinate;

/** Street number and name. */
@property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR thoroughfare;

/** Locality or city. */
@property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR locality;

/** Subdivision of locality, district or park. */
@property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR subLocality;

/** Region/State/Administrative area. */
@property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR administrativeArea;

/** Postal/Zip code. */
@property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR postalCode;

/** The country name. */
@property(nonatomic, copy, readonly) NSString *GMS_NULLABLE_PTR country;

/** An array of NSString containing formatted lines of the address. May be nil. */
@property(nonatomic, copy, readonly) GMS_NSArrayOf(NSString *) *GMS_NULLABLE_PTR lines;

/**
* Returns the first line of the address.
*
* This method is obsolete and deprecated and will be removed in a future release.
* Use the lines property instead.
*/
- (NSString *GMS_NULLABLE_PTR)addressLine1 __GMS_AVAILABLE_BUT_DEPRECATED;

/**
* Returns the second line of the address.
*
* This method is obsolete and deprecated and will be removed in a future release.
* Use the lines property instead.
*/
- (NSString *GMS_NULLABLE_PTR)addressLine2 __GMS_AVAILABLE_BUT_DEPRECATED;

@end

/**
* The former type of geocode results (pre-1.7). This remains here for migration and will be
* removed in future releases.
*/
@compatibility_alias GMSReverseGeocodeResult GMSAddress;

GMS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// GMSCALayer.h
// Google Maps SDK for iOS
//
// Copyright 2013 Google Inc.
//
// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
// Service: https://developers.google.com/maps/terms
//

#import <QuartzCore/QuartzCore.h>

/**
* GMSCALayer is a superclass used by layers in the Google Maps SDK for iOS,
* such as GMSMapLayer and GMSPanoramaLayer.
*
* This is an implementation detail and it should not be instantiated directly.
*/
@interface GMSCALayer : CALayer
@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
//
// GMSCameraPosition.h
// Google Maps SDK for iOS
//
// Copyright 2013 Google Inc.
//
// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
// Service: https://developers.google.com/maps/terms
//

#import <CoreLocation/CoreLocation.h>

#if __has_feature(modules)
@import GoogleMapsBase;
#else
#import <GoogleMapsBase/GoogleMapsBase.h>
#endif

GMS_ASSUME_NONNULL_BEGIN

/**
* An immutable class that aggregates all camera position parameters.
*/
@interface GMSCameraPosition : NSObject<NSCopying, NSMutableCopying>

/**
* Location on the Earth towards which the camera points.
*/
@property(nonatomic, readonly) CLLocationCoordinate2D target;

/**
* Zoom level. Zoom uses an exponentional scale, where zoom 0 represents the entire world as a
* 256 x 256 square. Each successive zoom level increases magnification by a factor of 2. So at
* zoom level 1, the world is 512x512, and at zoom level 2, the entire world is 1024x1024.
*/
@property(nonatomic, readonly) float zoom;

/**
* Bearing of the camera, in degrees clockwise from true north.
*/
@property(nonatomic, readonly) CLLocationDirection bearing;

/**
* The angle, in degrees, of the camera from the nadir (directly facing the Earth). 0 is
* straight down, 90 is parallel to the ground. Note that the maximum angle allowed is dependent
* on the zoom. You can think of it as a series of line segments as a function of zoom, rather
* than a step function. For zoom 16 and above, the maximum angle is 65 degrees. For zoom 10 and
* below, the maximum angle is 30 degrees.
*/
@property(nonatomic, readonly) double viewingAngle;

/**
* Designated initializer. Configures this GMSCameraPosition with all available camera properties.
* Building a GMSCameraPosition via this initializer (or by the following convenience constructors)
* will implicitly clamp camera values.
*
* @param target Location on the earth towards which the camera points.
* @param zoom The zoom level near the center of the screen.
* @param bearing Bearing of the camera in degrees clockwise from true north.
* @param viewingAngle The angle, in degrees, of the camera angle from the nadir (directly facing
* the Earth)
*/
- (id)initWithTarget:(CLLocationCoordinate2D)target
zoom:(float)zoom
bearing:(CLLocationDirection)bearing
viewingAngle:(double)viewingAngle;

/**
* Convenience constructor for GMSCameraPosition for a particular target and zoom level. This will
* set the bearing and viewingAngle properties of this camera to zero defaults (i.e., directly
* facing the Earth's surface, with the top of the screen pointing north).
*/
+ (instancetype)cameraWithTarget:(CLLocationCoordinate2D)target zoom:(float)zoom;

/**
* Convenience constructor for GMSCameraPosition, as per cameraWithTarget:zoom:.
*/
+ (instancetype)cameraWithLatitude:(CLLocationDegrees)latitude
longitude:(CLLocationDegrees)longitude
zoom:(float)zoom;

/**
* Convenience constructor for GMSCameraPosition, with all camera properties as per
* initWithTarget:zoom:bearing:viewingAngle:.
*/
+ (instancetype)cameraWithTarget:(CLLocationCoordinate2D)target
zoom:(float)zoom
bearing:(CLLocationDirection)bearing
viewingAngle:(double)viewingAngle;

/**
* Convenience constructor for GMSCameraPosition, with latitude/longitude and all other camera
* properties as per initWithTarget:zoom:bearing:viewingAngle:.
*/
+ (instancetype)cameraWithLatitude:(CLLocationDegrees)latitude
longitude:(CLLocationDegrees)longitude
zoom:(float)zoom
bearing:(CLLocationDirection)bearing
viewingAngle:(double)viewingAngle;

/**
* Get the zoom level at which |meters| distance, at given |coord| on Earth, correspond to the
* specified number of screen |points|.
*
* For extremely large or small distances the returned zoom level may be smaller or larger than the
* minimum or maximum zoom level allowed on the camera.
*
* This helper method is useful for building camera positions that contain specific physical areas
* on Earth.
*/
+ (float)zoomAtCoordinate:(CLLocationCoordinate2D)coordinate
forMeters:(CLLocationDistance)meters
perPoints:(CGFloat)points;

@end

/** Mutable version of GMSCameraPosition. */
@interface GMSMutableCameraPosition : GMSCameraPosition
@property(nonatomic, assign) CLLocationCoordinate2D target;
@property(nonatomic, assign) float zoom;
@property(nonatomic, assign) CLLocationDirection bearing;
@property(nonatomic, assign) double viewingAngle;
@end

/** The maximum zoom (closest to the Earth's surface) permitted by the map camera. */
FOUNDATION_EXTERN const float kGMSMaxZoomLevel;

/** The minimum zoom (farthest from the Earth's surface) permitted by the map camera. */
FOUNDATION_EXTERN const float kGMSMinZoomLevel;

GMS_ASSUME_NONNULL_END
Loading

0 comments on commit 086e60b

Please sign in to comment.