//
// WebViewController.m
// WhereDylanLives
//
// Created by John Valentino on 10/7/14.
// Copyright (c) 2014 SLU. All rights reserved.
//
#import "WebViewController.h"
@interface WebViewController ()
@end
@implementation WebViewController
@synthesize mapView;
-(void) goLocation
{
MKCoordinateRegion newRegion;
newRegion.center.latitude = 30.511;
newRegion.center.longitude = -90.468;
newRegion.span.latitudeDelta = 0.01;
newRegion.span.longitudeDelta = 0.01;
//30.511308, -90.468564
[self.mapView setRegion:newRegion animated:YES];
}
-(void) johnLocation
{
MKCoordinateRegion newRegion;
newRegion.center.latitude = 41.158;
newRegion.center.longitude = -74.012;
newRegion.span.latitudeDelta = 0.001;
newRegion.span.longitudeDelta = 0.001;
//41.158920, -74.012882
[self.mapView setRegion:newRegion animated:YES];
}
-(void) alyciaLocation
{
MKCoordinateRegion newRegion;
newRegion.center.latitude = 35.673;
newRegion.center.longitude = 139.78;
newRegion.span.latitudeDelta = 0.01;
newRegion.span.longitudeDelta = 0.01;
//35.673499, 139.781408
[self.mapView setRegion:newRegion animated:YES];
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self johnLocation];
mapView.showsUserLocation = NO;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#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.
}
*/
- (IBAction)changeMapType:(id)sender {
if (mapView.mapType == MKMapTypeStandard)
mapView.mapType = MKMapTypeSatellite;
else
mapView.mapType = MKMapTypeStandard;
}
- (IBAction)johnsHouse:(id)sender {
[self johnLocation];
mapView.showsUserLocation = YES;
}
- (IBAction)alyciaHome:(id)sender {
[self alyciaLocation];
mapView.showsUserLocation = YES;
}
@end |