Skip to content

Commit

Permalink
some changes (logo, startscreen)....
Browse files Browse the repository at this point in the history
  • Loading branch information
Obkircher Jakob committed Dec 9, 2010
1 parent 96d6a67 commit e2c7b0b
Show file tree
Hide file tree
Showing 20 changed files with 39,391 additions and 34,852 deletions.
1 change: 1 addition & 0 deletions Classes/JsonHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ -(NSMutableArray*)processWikipediaJSONData: (NSString*) jsonData{
for(NSDictionary *geoname in geonames){
//NSLog(@"Title: %@", [geoname objectForKey:@"title"]);
//[ret addObject:[geoname objectForKey:@"title"]];

[ret addObject:[NSDictionary dictionaryWithObjectsAndKeys:[geoname objectForKey:@"title"],kTitleKey, [geoname objectForKey:@"summary"],kSummaryKey,[NSString stringWithFormat:@"http://%@",[geoname objectForKey:@"wikipediaUrl"]],kUrlKey,[geoname objectForKey:@"lng"],kLonKey,[geoname objectForKey:@"lat"],kLatKey,[geoname objectForKey:@"elevation"],kAltKey, @"WIKIPEDIA",kSourceKey, nil]];
}
return ret;
Expand Down
27 changes: 19 additions & 8 deletions Classes/MarkerView.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
//
// MarkerView.h
// Mixare
//
// Created by Obkircher Jakob on 19.11.10.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
/*
* Copyright (C) 2010- Peer internet solutions
*
* This file is part of mixare.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>
*/

#import <UIKit/UIKit.h>


@interface MarkerView : UIView <UIWebViewDelegate>{
@interface MarkerView : UIView {
UIView * viewTouched;
NSString * _url;
UIView* loadView;
Expand Down
47 changes: 32 additions & 15 deletions Classes/MarkerView.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
//
// MarkerView.m
// Mixare
//
// Created by Obkircher Jakob on 19.11.10.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
/*
* Copyright (C) 2010- Peer internet solutions
*
* This file is part of mixare.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>
*/

#import "MarkerView.h"

Expand Down Expand Up @@ -37,26 +48,31 @@ - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
//[viewTouched touchesEnded:touches withEvent:event];
UIButton * closeButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[closeButton setTitle:@"Close" forState:UIControlStateNormal];
[closeButton addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
closeButton.titleLabel.text = @"Close";
//closeButton.titleLabel.backgroundColor = [UIColor grayColor];
//closeButton.backgroundColor = [UIColor grayColor];
closeButton.alpha = .6;
closeButton.titleLabel.textColor = [UIColor blackColor];
[closeButton addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
CGRect infoFrame;
CGRect webFrame;
CGRect buttobFrame;
if([[UIDevice currentDevice] orientation] == UIDeviceOrientationPortrait){
infoFrame = CGRectMake(0, 480, 0, 0);
webFrame = CGRectMake(0, 20, 320, 220);
closeButton.frame = CGRectMake(260, 0, 60, 20);
webFrame = CGRectMake(0, 25, 320, 220);
closeButton.frame = CGRectMake(260, 0, 60, 25);
buttobFrame= CGRectMake(0, 0, 320, 240);
}else{
closeButton.frame = CGRectMake(420, 0, 60, 20);
closeButton.frame = CGRectMake(420, 0, 60, 25);
infoFrame = CGRectMake(0, 320, 0, 0);
webFrame = CGRectMake(0, 20, 480, 160);
webFrame = CGRectMake(0, 25, 480, 160);
buttobFrame= CGRectMake(0, 0, 480, 160);
}
UIView * infoView = [[UIView alloc]initWithFrame:infoFrame];
UIWebView * webView = [[UIWebView alloc]initWithFrame:webFrame];
webView.delegate = self;
//UIButton * transparentButton = [[UIButton alloc]initWithFrame:buttobFrame];
//[transparentButton addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
//webView.delegate = self;
webView.alpha = .7;
[infoView addSubview:webView];
NSURL *requestURL = [NSURL URLWithString:_url];
Expand All @@ -78,6 +94,7 @@ - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
infoView.alpha = .8;
[[self superview] addSubview:infoView];
[infoView addSubview:closeButton];
//[infoView addSubview:transparentButton];
[UIView commitAnimations];
}

Expand Down Expand Up @@ -105,7 +122,7 @@ - (void)dealloc {


#pragma mark WebViewDelegate
- (void)webViewDidStartLoad:(UIWebView *)webView{
/*- (void)webViewDidStartLoad:(UIWebView *)webView{
loadView = [[[UIView alloc]initWithFrame:CGRectMake(0, 0, 120, 120)]autorelease];
loadView.center = webView.center;
UIActivityIndicatorView * ai = [[[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]autorelease];
Expand Down Expand Up @@ -134,7 +151,7 @@ - (void)webViewDidFinishLoad:(UIWebView *)webView{
}
}

*/


@end
40 changes: 19 additions & 21 deletions Classes/MixareAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
NSLog(@"the url: %@", [url absoluteString]);
if (!url) { return NO; }
NSString *URLString = [url absoluteString];
[[NSUserDefaults standardUserDefaults] setObject:URLString forKey:@"url"];
[[NSUserDefaults standardUserDefaults] setObject:URLString forKey:@"extern_url"];
[[NSUserDefaults standardUserDefaults] synchronize];
return YES;
}
Expand All @@ -71,15 +71,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
((UITabBarItem *)[_tabBarController.tabBar.items objectAtIndex:1]).title = NSLocalizedString(@"Sources", @"2 tabbar icon");
((UITabBarItem *)[_tabBarController.tabBar.items objectAtIndex:2]).title = NSLocalizedString(@"List View", @"3 tabbar icon");
((UITabBarItem *)[_tabBarController.tabBar.items objectAtIndex:3]).title = NSLocalizedString(@"Map", @"4 tabbar icon");

// UIAlertView *addAlert = [[UIAlertView alloc]initWithTitle:NSLocalizedString(@"Add Source",nil)
// message:@"Copyright (C) 2010- Peer internet solutions\n
// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. \n
//
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details. \n
//
// You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/" delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel",nil) otherButtonTitles:NSLocalizedString(@"OK",nil), nil];
NSString* licenseText = [[NSUserDefaults standardUserDefaults] objectForKey:@"mixaresFirstLounch"];
if([licenseText isEqualToString:@""] || licenseText ==nil ) {
UIAlertView *addAlert = [[UIAlertView alloc]initWithTitle:NSLocalizedString(@"License",nil)message:@"Copyright (C) 2010- Peer internet solutions\n This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. \n This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. \nYou should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/" delegate:self cancelButtonTitle:NSLocalizedString(@"OK",nil) otherButtonTitles:nil, nil];
[addAlert show];
[addAlert release];
[[NSUserDefaults standardUserDefaults] setObject:@"TRUE" forKey:@"mixaresFirstLounch"];
}

return YES;
}
Expand Down Expand Up @@ -127,6 +125,7 @@ -(void)setViewToPortrait:(UIView*)viewObject{
[viewObject setCenter:CGPointMake(240, 160)];
_menuButton.frame = CGRectMake(190, 0, 130, 30);
_slider.frame = CGRectMake(62, 5, 128, 23);
maxRadiusLabel.frame= CGRectMake(158, 25, 30, 12);
}

-(void)markerClick:(id)sender{
Expand All @@ -143,7 +142,7 @@ -(void) iniARView{
augViewController.delegate = self;

augViewController.scaleViewsBasedOnDistance = YES;
augViewController.minimumScaleFactor = 0.8;
augViewController.minimumScaleFactor = 0.6;

augViewController.rotateViewsBasedOnPerspective = YES;

Expand Down Expand Up @@ -172,7 +171,7 @@ -(void) initControls{
CGRect valueFrame;
buttonFrame = CGRectMake(190, 0, 130, 30);
sliderFrame = CGRectMake(62, 5, 128, 23);
valueFrame = CGRectMake(16, 64, 35, 10);
valueFrame = CGRectMake(8.5, 64, 45, 12);
_menuButton.frame = buttonFrame;
_menuButton.alpha = 0.65;
[_menuButton addTarget:self action:@selector(buttonClick:)forControlEvents:UIControlEventValueChanged];
Expand All @@ -188,21 +187,21 @@ -(void) initControls{
_valueLabel = [[UILabel alloc] initWithFrame:valueFrame];
_valueLabel.backgroundColor = [UIColor blackColor];
_valueLabel.textColor= [UIColor whiteColor];
_valueLabel.font = [UIFont systemFontOfSize:8.0];
_valueLabel.font = [UIFont systemFontOfSize:10.0];
_valueLabel.textAlignment= UITextAlignmentCenter;

nordLabel = [[UILabel alloc]initWithFrame:CGRectMake(26, 2, 10, 10)];
nordLabel = [[UILabel alloc]initWithFrame:CGRectMake(28, 2, 10, 10)];
nordLabel.backgroundColor = [UIColor blackColor];
nordLabel.textColor= [UIColor whiteColor];
nordLabel.font = [UIFont systemFontOfSize:8.0];
nordLabel.textAlignment= UITextAlignmentCenter;
nordLabel.text = @"N";
nordLabel.alpha = 0.8;

maxRadiusLabel = [[UILabel alloc]initWithFrame:CGRectMake(160, 28, 30, 10)];
maxRadiusLabel = [[UILabel alloc]initWithFrame:CGRectMake(158, 25, 30, 12)];
maxRadiusLabel.backgroundColor = [UIColor blackColor];
maxRadiusLabel.textColor= [UIColor whiteColor];
maxRadiusLabel.font = [UIFont systemFontOfSize:8.0];
maxRadiusLabel.font = [UIFont systemFontOfSize:10.0];
maxRadiusLabel.textAlignment= UITextAlignmentCenter;
maxRadiusLabel.text = @"80 km";
maxRadiusLabel.hidden = YES;
Expand Down Expand Up @@ -285,7 +284,9 @@ -(void)downloadData{

if([self checkIfDataSourceIsEanabled:@"Wikipedia"]){
NSLog(@"Downloading WIki data");
wikiData = [[NSString alloc]initWithContentsOfURL:[NSURL URLWithString:[DataSource createRequestURLFromDataSource:@"WIKIPEDIA" Lat:pos.coordinate.latitude Lon:pos.coordinate.longitude Alt:pos.altitude radius:radius Lang:@"de"]] encoding:NSUTF8StringEncoding error:nil];
NSString *language = [[NSLocale preferredLanguages] objectAtIndex:0];
NSLog(@"Language: %@",language);
wikiData = [[NSString alloc]initWithContentsOfURL:[NSURL URLWithString:[DataSource createRequestURLFromDataSource:@"WIKIPEDIA" Lat:pos.coordinate.latitude Lon:pos.coordinate.longitude Alt:pos.altitude radius:radius Lang:language]] encoding:NSUTF8StringEncoding error:nil];
NSLog(@"Download done");
}else {
wikiData = nil;
Expand Down Expand Up @@ -479,10 +480,7 @@ Restart any tasks that were paused (or not yet started) while the application wa


- (void)applicationWillTerminate:(UIApplication *)application {
/*
Called when the application is about to terminate.
See also applicationDidEnterBackground:.
*/
[[NSUserDefaults standardUserDefaults]removeObjectForKey:@"extern_url"];
}


Expand Down
25 changes: 18 additions & 7 deletions Classes/MoreViewController.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
//
// MoreViewController.h
// Mixare
//
// Created by Obkircher Jakob on 23.11.10.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
/*
* Copyright (C) 2010- Peer internet solutions
*
* This file is part of mixare.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>
*/

#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
Expand Down
25 changes: 18 additions & 7 deletions Classes/MoreViewController.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
//
// MoreViewController.m
// Mixare
//
// Created by Obkircher Jakob on 23.11.10.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
/*
* Copyright (C) 2010- Peer internet solutions
*
* This file is part of mixare.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>
*/

#import "MoreViewController.h"

Expand Down
25 changes: 18 additions & 7 deletions Classes/Radar.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
//
// Radar.h
// Mixare
//
// Created by Obkircher Jakob on 22.11.10.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
/*
* Copyright (C) 2010- Peer internet solutions
*
* This file is part of mixare.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>
*/

#import <UIKit/UIKit.h>
#define RADIUS 30.0
Expand Down
25 changes: 18 additions & 7 deletions Classes/Radar.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
//
// Radar.m
// Mixare
//
// Created by Obkircher Jakob on 22.11.10.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//
/*
* Copyright (C) 2010- Peer internet solutions
*
* This file is part of mixare.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>
*/

#import "Radar.h"
#define radians(x) (M_PI * (x) / 180.0)
Expand Down
26 changes: 19 additions & 7 deletions Classes/RadarViewPortView.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
//
// RadarViewPortView.h
// Mixare
//
// Created by Obkircher Jakob on 23.11.10.
// Copyright (c) 2010 __MyCompanyName__. All rights reserved.
//

/*
* Copyright (C) 2010- Peer internet solutions
*
* This file is part of mixare.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>
*/

#import <UIKit/UIKit.h>
#import "Radar.h"
Expand Down
Loading

0 comments on commit e2c7b0b

Please sign in to comment.