Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hw #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

hw #11

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
644 changes: 644 additions & 0 deletions APIHomework/APIHomework.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions APIHomework/APIHomework.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//
// AppDelegate.h
// TalkinToTheNet
// APIHomework
//
// Created by Michael Kavouras on 9/20/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
// Created by Varindra Hart on 9/24/15.
// Copyright © 2015 Varindra Hart. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// AppDelegate.m
// TalkinToTheNet
// APIHomework
//
// Created by Michael Kavouras on 9/20/15.
// Copyright © 2015 Mike Kavouras. All rights reserved.
// Created by Varindra Hart on 9/24/15.
// Copyright © 2015 Varindra Hart. All rights reserved.
//

@import GoogleMaps;
#import "AppDelegate.h"

@interface AppDelegate ()
Expand All @@ -17,6 +17,8 @@ @implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.

[GMSServices provideAPIKey:@"AIzaSyDWOxAPyTwNK28M-bUSxv0UfRXywVlwYKQ"];
return YES;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,36 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
Expand Down
352 changes: 352 additions & 0 deletions APIHomework/APIHomework/Base.lproj/Main.storyboard

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions APIHomework/APIHomework/DetailViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// DetailViewController.h
// APIHomework
//
// Created by Varindra Hart on 9/24/15.
// Copyright © 2015 Varindra Hart. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "FourSquareEntry.h"

@interface DetailViewController : UIViewController

@property (nonatomic) FourSquareEntry *entry;

@end
64 changes: 64 additions & 0 deletions APIHomework/APIHomework/DetailViewController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// DetailViewController.m
// APIHomework
//
// Created by Varindra Hart on 9/24/15.
// Copyright © 2015 Varindra Hart. All rights reserved.
//



#pragma mark INFO
//This ViewController is for the GOOGLEMAP, which had to be embedded in the
//MapAndLabelsViewController


@import GoogleMaps;
#import "DetailViewController.h"

@interface DetailViewController ()
@property (nonatomic) GMSMapView *mapView_;
@property (weak, nonatomic) IBOutlet UIView *viewForMap;

@end

@implementation DetailViewController

- (void)viewDidLoad {
[super viewDidLoad];
[self setUpMaps];
// Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

- (void)setUpMaps{

GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:[self.entry.lat floatValue]
longitude:[self.entry.lng floatValue]
zoom:15];
self.mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
self.mapView_.myLocationEnabled = YES;
//self.viewForMap = self.mapView_;
self.view = self.mapView_;
// Creates a marker in the center of the map.
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake([self.entry.lat floatValue], [self.entry.lng floatValue]);
// marker.title = @"Sydney";
// marker.snippet = @"Australia";
marker.map = self.mapView_;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/

@end
22 changes: 22 additions & 0 deletions APIHomework/APIHomework/FourSquareEntry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// FourSquareEntry.h
// APIHomework
//
// Created by Varindra Hart on 9/24/15.
// Copyright © 2015 Varindra Hart. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface FourSquareEntry : NSObject

@property (nonatomic) NSString *name;
@property (nonatomic) NSString *lat;
@property (nonatomic) NSString *lng;
@property (nonatomic) NSString *url;
@property (nonatomic) NSString *phoneNumber;
@property (nonatomic) NSArray *formattedAddress;
@property (nonatomic) NSString *menuUrl;

@end
13 changes: 13 additions & 0 deletions APIHomework/APIHomework/FourSquareEntry.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// FourSquareEntry.m
// APIHomework
//
// Created by Varindra Hart on 9/24/15.
// Copyright © 2015 Varindra Hart. All rights reserved.
//

#import "FourSquareEntry.h"

@implementation FourSquareEntry

@end
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Message Here 2</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Message Here 1</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand Down Expand Up @@ -36,5 +45,12 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
16 changes: 16 additions & 0 deletions APIHomework/APIHomework/MapAndLabelsViewController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// MapAndLabelsViewController.h
// APIHomework
//
// Created by Varindra Hart on 9/25/15.
// Copyright © 2015 Varindra Hart. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "FourSquareEntry.h"

@interface MapAndLabelsViewController : UIViewController

@property (nonatomic) FourSquareEntry *entry;

@end
Loading