Permalink
Browse files

updated tile settings and login button

  • Loading branch information...
davidchiles committed Dec 1, 2012
1 parent fee544a commit 87b6145263572c645aac765f9ee1fcf58d815397
@@ -218,8 +218,6 @@
63214B2D153CB382001C9A58 /* stardavid.png in Resources */ = {isa = PBXBuildFile; fileRef = 63214B2C153CB382001C9A58 /* stardavid.png */; };
63214B2F153CB390001C9A58 /* stardavid@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 63214B2E153CB390001C9A58 /* stardavid@2x.png */; };
632573B11520FFB200478B78 /* tileSource.plist in Resources */ = {isa = PBXBuildFile; fileRef = 632573B01520FFB100478B78 /* tileSource.plist */; };
- 632573DB152108BD00478B78 /* OPEStamenTerrain.m in Sources */ = {isa = PBXBuildFile; fileRef = 632573DA152108BD00478B78 /* OPEStamenTerrain.m */; };
- 632573DF15211A1C00478B78 /* OPEStamenToner.m in Sources */ = {isa = PBXBuildFile; fileRef = 632573DE15211A1C00478B78 /* OPEStamenToner.m */; };
6325B4451534B28B00C8691F /* location.png in Resources */ = {isa = PBXBuildFile; fileRef = 6325B4431534B28A00C8691F /* location.png */; };
6325B4461534B28B00C8691F /* location@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6325B4441534B28B00C8691F /* location@2x.png */; };
63292E6B1593ED670010A11B /* OPEBinaryCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 63292E621593ED670010A11B /* OPEBinaryCell.m */; };
@@ -282,6 +280,7 @@
63A2DB4615226CF6000C095D /* gear@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 63A2DB4415226CF6000C095D /* gear@2x.png */; };
63AD8F7A15E8570B006F92B8 /* OPECategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 63AD8F7915E8570B006F92B8 /* OPECategory.m */; };
63AD8F7D15E8577E006F92B8 /* OPEType.m in Sources */ = {isa = PBXBuildFile; fileRef = 63AD8F7C15E8577E006F92B8 /* OPEType.m */; };
+ 63B1B7DB16698FAB006CFD68 /* OPEOpenStreetMapSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 63B1B7DA16698FAA006CFD68 /* OPEOpenStreetMapSource.m */; };
63B748A5162781820052148E /* memorial@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 63B748A3162781820052148E /* memorial@2x.png */; };
63B748A6162781820052148E /* townhall@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 63B748A4162781820052148E /* townhall@2x.png */; };
63B748A91627818D0052148E /* memorial.png in Resources */ = {isa = PBXBuildFile; fileRef = 63B748A71627818C0052148E /* memorial.png */; };
@@ -583,10 +582,6 @@
63214B2C153CB382001C9A58 /* stardavid.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = stardavid.png; sourceTree = "<group>"; };
63214B2E153CB390001C9A58 /* stardavid@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stardavid@2x.png"; sourceTree = "<group>"; };
632573B01520FFB100478B78 /* tileSource.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = tileSource.plist; sourceTree = "<group>"; };
- 632573D9152108BD00478B78 /* OPEStamenTerrain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPEStamenTerrain.h; sourceTree = "<group>"; };
- 632573DA152108BD00478B78 /* OPEStamenTerrain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPEStamenTerrain.m; sourceTree = "<group>"; };
- 632573DD15211A1C00478B78 /* OPEStamenToner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPEStamenToner.h; sourceTree = "<group>"; };
- 632573DE15211A1C00478B78 /* OPEStamenToner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPEStamenToner.m; sourceTree = "<group>"; };
6325B4431534B28A00C8691F /* location.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = location.png; path = icons/location.png; sourceTree = "<group>"; };
6325B4441534B28B00C8691F /* location@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "location@2x.png"; path = "icons/location@2x.png"; sourceTree = "<group>"; };
63292E611593ED670010A11B /* OPEBinaryCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPEBinaryCell.h; sourceTree = "<group>"; };
@@ -702,6 +697,8 @@
63AD8F7B15E8577D006F92B8 /* OPEType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPEType.h; sourceTree = "<group>"; };
63AD8F7C15E8577E006F92B8 /* OPEType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPEType.m; sourceTree = "<group>"; };
63AFC7BC15ACE3DB00A50C29 /* OPEPoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OPEPoint.h; sourceTree = "<group>"; };
+ 63B1B7D916698FAA006CFD68 /* OPEOpenStreetMapSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPEOpenStreetMapSource.h; sourceTree = "<group>"; };
+ 63B1B7DA16698FAA006CFD68 /* OPEOpenStreetMapSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPEOpenStreetMapSource.m; sourceTree = "<group>"; };
63B748A3162781820052148E /* memorial@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "memorial@2x.png"; sourceTree = "<group>"; };
63B748A4162781820052148E /* townhall@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "townhall@2x.png"; sourceTree = "<group>"; };
63B748A71627818C0052148E /* memorial.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = memorial.png; sourceTree = "<group>"; };
@@ -1122,14 +1119,12 @@
632573DC152108C300478B78 /* MapSources */ = {
isa = PBXGroup;
children = (
- 632573D9152108BD00478B78 /* OPEStamenTerrain.h */,
- 632573DA152108BD00478B78 /* OPEStamenTerrain.m */,
- 632573DD15211A1C00478B78 /* OPEStamenToner.h */,
- 632573DE15211A1C00478B78 /* OPEStamenToner.m */,
63FCA4401643127D00A28470 /* OPEBingTileSource.h */,
63FCA4411643127D00A28470 /* OPEBingTileSource.m */,
638445E81665BBEA004570A5 /* OPEOpenMapQuestAerialTileSource.h */,
638445E91665BBEA004570A5 /* OPEOpenMapQuestAerialTileSource.m */,
+ 63B1B7D916698FAA006CFD68 /* OPEOpenStreetMapSource.h */,
+ 63B1B7DA16698FAA006CFD68 /* OPEOpenStreetMapSource.m */,
);
name = MapSources;
sourceTree = "<group>";
@@ -1910,8 +1905,6 @@
6383949514EC7DAC00C74A57 /* GTMOAuthAuthentication.m in Sources */,
6383949614EC7DAC00C74A57 /* GTMOAuthSignIn.m in Sources */,
6383949714EC7DAC00C74A57 /* GTMHTTPFetcher.m in Sources */,
- 632573DB152108BD00478B78 /* OPEStamenTerrain.m in Sources */,
- 632573DF15211A1C00478B78 /* OPEStamenToner.m in Sources */,
636D7819152E58F8005E31A3 /* MBProgressHUD.m in Sources */,
63E525D21534D90500D2DA35 /* OPECreditViewController.m in Sources */,
6310F4B6153736D000C65FD8 /* OPEMessage.m in Sources */,
@@ -1928,6 +1921,7 @@
63C2035A164B153200C0F1EF /* OPEPoint.m in Sources */,
633CD877164B28DA00678D58 /* OPEFileUpdater.m in Sources */,
638445EA1665BBEA004570A5 /* OPEOpenMapQuestAerialTileSource.m in Sources */,
+ 63B1B7DB16698FAB006CFD68 /* OPEOpenStreetMapSource.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -9,11 +9,11 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "OSM POI Editor/OPEViewController.m"
- timestampString = "373942607.708528"
+ timestampString = "376017465.269111"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "93"
- endingLineNumber = "93"
+ startingLineNumber = "94"
+ endingLineNumber = "94"
landmarkName = "-viewDidLoad"
landmarkType = "5">
</FileBreakpoint>
@@ -175,11 +175,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEViewController.m"
- timestampString = "375769423.025644"
+ timestampString = "376018071.578537"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "244"
- endingLineNumber = "244"
+ startingLineNumber = "251"
+ endingLineNumber = "251"
landmarkName = "-mapView:layerForAnnotation:"
landmarkType = "5">
</FileBreakpoint>
@@ -214,11 +214,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEInfoViewController.m"
- timestampString = "375845522.142041"
+ timestampString = "376018649.134933"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "334"
- endingLineNumber = "334"
+ startingLineNumber = "328"
+ endingLineNumber = "328"
landmarkName = "-loggedIn"
landmarkType = "5">
</FileBreakpoint>
@@ -461,11 +461,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEViewController.m"
- timestampString = "375769423.025644"
+ timestampString = "376018071.578537"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "465"
- endingLineNumber = "465"
+ startingLineNumber = "472"
+ endingLineNumber = "472"
landmarkName = "@implementation OPEViewController"
landmarkType = "3">
</FileBreakpoint>
@@ -760,11 +760,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEInfoViewController.m"
- timestampString = "375845522.142041"
+ timestampString = "376018649.134933"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "162"
- endingLineNumber = "162"
+ startingLineNumber = "158"
+ endingLineNumber = "158"
landmarkName = "-signInToOSM"
landmarkType = "5">
</FileBreakpoint>
@@ -773,11 +773,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEInfoViewController.m"
- timestampString = "375845522.142041"
+ timestampString = "376018649.134933"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "293"
- endingLineNumber = "293"
+ startingLineNumber = "287"
+ endingLineNumber = "287"
landmarkName = "-tableView:didSelectRowAtIndexPath:"
landmarkType = "5">
</FileBreakpoint>
@@ -786,24 +786,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEInfoViewController.m"
- timestampString = "375845522.142041"
+ timestampString = "376018649.134933"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "381"
- endingLineNumber = "381"
- landmarkName = "-viewDidAppear:"
- landmarkType = "5">
- </FileBreakpoint>
- <FileBreakpoint
- shouldBeEnabled = "No"
- ignoreCount = "0"
- continueAfterRunningActions = "No"
- filePath = "OSM POI Editor/OPEInfoViewController.m"
- timestampString = "375845522.142041"
- startingColumnNumber = "9223372036854775807"
- endingColumnNumber = "9223372036854775807"
- startingLineNumber = "325"
- endingLineNumber = "325"
+ startingLineNumber = "319"
+ endingLineNumber = "319"
landmarkName = "-loggedIn"
landmarkType = "5">
</FileBreakpoint>
@@ -981,11 +968,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEViewController.m"
- timestampString = "375769423.025644"
+ timestampString = "376018071.578537"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "477"
- endingLineNumber = "477"
+ startingLineNumber = "484"
+ endingLineNumber = "484"
landmarkName = "-addMarkers:"
landmarkType = "5">
</FileBreakpoint>
@@ -994,11 +981,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEViewController.m"
- timestampString = "375769423.025644"
+ timestampString = "376018071.578537"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "242"
- endingLineNumber = "242"
+ startingLineNumber = "249"
+ endingLineNumber = "249"
landmarkName = "-mapView:layerForAnnotation:"
landmarkType = "5">
</FileBreakpoint>
@@ -1007,11 +994,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEViewController.m"
- timestampString = "375769423.025644"
+ timestampString = "376017465.269111"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "222"
- endingLineNumber = "222"
+ startingLineNumber = "223"
+ endingLineNumber = "223"
landmarkName = "-markerWithNode:"
landmarkType = "5">
</FileBreakpoint>
@@ -1068,20 +1055,20 @@
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
- shouldBeEnabled = "Yes"
+ shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEInfoViewController.m"
- timestampString = "375845943.484833"
+ timestampString = "376018649.134933"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "363"
- endingLineNumber = "363"
+ startingLineNumber = "354"
+ endingLineNumber = "354"
landmarkName = "+getTileSourceFromNumber:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
- shouldBeEnabled = "Yes"
+ shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPEOpenMapQuestAerialTileSource.m"
@@ -1093,6 +1080,32 @@
landmarkName = "-init"
landmarkType = "5">
</FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "OSM POI Editor/OPEFileUpdater.m"
+ timestampString = "376016214.63263"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "28"
+ endingLineNumber = "28"
+ landmarkName = "-downloadFiles"
+ landmarkType = "5">
+ </FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "OSM POI Editor/OPEViewController.m"
+ timestampString = "376018002.49543"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "234"
+ endingLineNumber = "234"
+ landmarkName = "-markerWithNode:"
+ landmarkType = "5">
+ </FileBreakpoint>
</FileBreakpoints>
<ExceptionBreakpoints>
<ExceptionBreakpoint
@@ -33,7 +33,6 @@
@interface OPEInfoViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
-@property (nonatomic, strong) UIButton * loginButton;
@property (nonatomic, strong) UITableView * settingsTableView;
@property (nonatomic, strong) id<OPEInfoViewControllerDelegate> delegate;
@property (nonatomic) int currentNumber;
@@ -21,10 +21,8 @@
// along with POI+. If not, see <http://www.gnu.org/licenses/>.
#import "OPEInfoViewController.h"
-#import "OPEStamenTerrain.h"
-#import "OPEStamenToner.h"
#import "OPEOpenMapQuestAerialTileSource.h"
-#import "RMOpenStreetMapSource.h"
+#import "OPEOpenStreetMapSource.h"
#import "OPEBingTileSource.h"
#import "OPEAPIConstants.h"
@@ -45,7 +43,6 @@ - (void)viewDidLoad
[settingsTableView setDelegate:self];
settingsTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
- [self.loginButton addTarget:self action:@selector(osmButtonPressed:) forControlEvents:UIControlEventTouchUpInside];
NSUserDefaults *settings = [NSUserDefaults standardUserDefaults];
if ([settings objectForKey:@"tileSourceNumber"]) {
currentNumber = [[settings objectForKey:@"tileSourceNumber"] intValue];
@@ -83,6 +80,7 @@ - (IBAction)doneButtonPressed:(id)sender
- (void)viewController:(GTMOAuthViewControllerTouch *)viewController
finishedWithAuth:(GTMOAuthAuthentication *)auth
error:(NSError *)error {
+ [settingsTableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationAutomatic];
if (error != nil) {
// Authentication failed (perhaps the user denied access, or closed the
// window before granting access)
@@ -114,8 +112,6 @@ - (void)viewController:(GTMOAuthViewControllerTouch *)viewController
// Just to prove we're signed in, we'll attempt an authenticated fetch for the
// signed-in user
//[self doAnAuthenticatedAPIFetch];
- [self.loginButton setTitle:@"Logout of OSM" forState:UIControlStateNormal];
- self.loginButton.tag = 1;
}
//[self updateUI];
@@ -176,9 +172,7 @@ - (void)signInToOSM {
- (void) signOutOfOSM
{
[GTMOAuthViewControllerTouch removeParamsFromKeychainForName:@"OSMPOIEditor"];
- self.loginButton.tag = 0;
- [self.loginButton setTitle:@"Login to OSM" forState:UIControlStateNormal];
- [settingsTableView reloadData];
+ [settingsTableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationAutomatic];
}
#pragma - TableView
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
@@ -312,7 +306,7 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *
-(void)changeTileSourceTo:(NSString *) newSoureceName
{
id <RMTileSource> newTileSource = nil;
- newTileSource = [[OPEStamenTerrain alloc] init];
+ newTileSource = [[OPEBingTileSource alloc] init];
//[delegate setTileSource:newTileSource a];
@@ -356,14 +350,14 @@ -(void)infoButtonPressed:(id)sender
+ (id)getTileSourceFromNumber:(int) num
{
- if (num == 0) {
- return [[OPEBingTileSource alloc] initWithMapsKey:bingMapsKey];
- }
- else if (num == 1) {
+ if (num == 1) {
return [[OPEOpenMapQuestAerialTileSource alloc] init];
}
else if (num == 2) {
- return [[RMOpenStreetMapSource alloc] init];
+ return [[OPEOpenStreetMapSource alloc] init];
+ }
+ else{
+ return [[OPEBingTileSource alloc] initWithMapsKey:bingMapsKey];
}
@@ -373,14 +367,12 @@ + (id)getTileSourceFromNumber:(int) num
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
-
}
-- (void)viewDidAppear:(BOOL)animated
+-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[settingsTableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationAutomatic];
-
}
- (void)viewDidUnload
Oops, something went wrong.

0 comments on commit 87b6145

Please sign in to comment.