Authored by Hal Mueller

added some engineering data display on the flipside view

... ... @@ -35,6 +35,7 @@
UILabel *centerLon;
UILabel *zoomLevel;
UILabel *rmscale;
UILabel *truescale;
}
#pragma mark -
... ... @@ -44,5 +45,6 @@
@property(nonatomic,retain) IBOutlet UILabel *centerLon;
@property(nonatomic,retain) IBOutlet UILabel *zoomLevel;
@property(nonatomic,retain) IBOutlet UILabel *rmscale;
@property(nonatomic,retain) IBOutlet UILabel *truescale;
@end
... ...
... ... @@ -29,7 +29,8 @@
//
#import "FlipsideViewController.h"
#import "MapSampleAppDelegate.h"
#import "MyMapView.h"
@implementation FlipsideViewController
... ... @@ -40,6 +41,7 @@
@synthesize centerLon;
@synthesize zoomLevel;
@synthesize rmscale;
@synthesize truescale;
// init
... ... @@ -52,7 +54,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
}
... ... @@ -70,12 +72,27 @@
// Release anything that's not essential, such as cached data
}
- (void)viewDidAppear:(BOOL)animated {
NSLog(@"viewDidAppear");
RMMapContents *contents = [(MapSampleAppDelegate *)[[UIApplication sharedApplication] delegate] mapContents];
CLLocationCoordinate2D mapCenter = [contents mapCenter];
[centerLat setText:[NSString stringWithFormat:@"%f", mapCenter.latitude]];
[centerLon setText:[NSString stringWithFormat:@"%f", mapCenter.longitude]];
[zoomLevel setText:[NSString stringWithFormat:@"%.2f", [contents zoom]]];
float routemeMetersPerPixel = [contents scale]; // really meters/pixel
[rmscale setText:[NSString stringWithFormat:@"%.1f", routemeMetersPerPixel]];
float iphoneMillimetersPerPixel = .1543;
float truescaleDenominator = routemeMetersPerPixel / (0.001 * iphoneMillimetersPerPixel) ;
[truescale setText:[NSString stringWithFormat:@"1:%.0f", truescaleDenominator]];
}
- (void)dealloc {
self.centerLat = nil;
self.centerLon = nil;
self.zoomLevel = nil;
self.rmscale = nil;
self.truescale = nil;
[super dealloc];
}
... ...
... ... @@ -29,6 +29,7 @@
//
#import "MainViewController.h"
#import "MapSampleAppDelegate.h"
#import "MyMapView.h"
@implementation MainViewController
... ... @@ -42,12 +43,13 @@
}
/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
[(MapSampleAppDelegate *)[[UIApplication sharedApplication] delegate] setMapContents:[(MyMapView *)[self view] contents]];
}
*/
/*
... ...
... ... @@ -29,16 +29,19 @@
//
#import <UIKit/UIKit.h>
#import "RMMapView.h"
@class RootViewController;
@interface MapSampleAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
RootViewController *rootViewController;
RMMapContents *mapContents;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet RootViewController *rootViewController;
@property(nonatomic,retain) RMMapContents *mapContents;
@end
... ...
... ... @@ -36,7 +36,7 @@
@synthesize window;
@synthesize rootViewController;
@synthesize mapContents;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
... ...
... ... @@ -32,7 +32,6 @@
@implementation MyMapView
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
... ... @@ -45,7 +44,6 @@
// Drawing code
}
- (void)dealloc {
[super dealloc];
}
... ...
... ... @@ -36,103 +36,150 @@
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBUILabel" id="287574730">
<object class="IBUILabel" id="336199844">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{144, 59}, {56, 21}}</string>
<string key="NSFrame">{{131, 91}, {85, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Center:</string>
<object class="NSColor" key="IBUITextColor" id="262931149">
<string key="IBUIText">Center Lat:</string>
<object class="NSColor" key="IBUITextColor" id="872501489">
<int key="NSColorSpace">1</int>
<bytes key="NSRGB">MSAxIDEAA</bytes>
</object>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
<int key="IBUITextAlignment">2</int>
</object>
<object class="IBUILabel" id="670366007">
<object class="IBUILabel" id="141815128">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{208, 59}, {42, 21}}</string>
<string key="NSFrame">{{127, 120}, {89, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Center Lon:</string>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
<int key="IBUITextAlignment">2</int>
</object>
<object class="IBUILabel" id="561724603">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{224, 91}, {86, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Label</string>
<reference key="IBUITextColor" ref="262931149"/>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
</object>
<object class="IBUILabel" id="254178060">
<object class="IBUILabel" id="30982843">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{111, 88}, {89, 21}}</string>
<string key="NSFrame">{{127, 159}, {89, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">zoomLevel:</string>
<reference key="IBUITextColor" ref="262931149"/>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
<int key="IBUITextAlignment">2</int>
</object>
<object class="IBUILabel" id="884551957">
<object class="IBUILabel" id="971773762">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{208, 88}, {42, 21}}</string>
<string key="NSFrame">{{224, 159}, {42, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Label</string>
<reference key="IBUITextColor" ref="262931149"/>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
</object>
<object class="IBUILabel" id="820332677">
<object class="IBUILabel" id="43404614">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{35, 117}, {165, 21}}</string>
<string key="NSFrame">{{20, 188}, {196, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string type="base64-UTF8" key="IBUIText">InNjYWxlIiAobWV0ZXJzL3BpeGVsKTo</string>
<reference key="IBUITextColor" ref="262931149"/>
<string type="base64-UTF8" key="IBUIText">Uk0gInNjYWxlIiAobWV0ZXJzL3BpeGVsKTo</string>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
<int key="IBUITextAlignment">2</int>
</object>
<object class="IBUILabel" id="9368208">
<object class="IBUILabel" id="1055911682">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{208, 117}, {42, 21}}</string>
<string key="NSFrame">{{224, 188}, {86, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Label</string>
<reference key="IBUITextColor" ref="262931149"/>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
</object>
<object class="IBUILabel" id="296517720">
<object class="IBUILabel" id="401716894">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{258, 59}, {42, 21}}</string>
<string key="NSFrame">{{20, 217}, {196, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">true scale (ratio):</string>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
<int key="IBUITextAlignment">2</int>
</object>
<object class="IBUILabel" id="916698432">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{224, 217}, {86, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Label</string>
<reference key="IBUITextColor" ref="262931149"/>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
</object>
<object class="IBUILabel" id="84945264">
<reference key="NSNextResponder" ref="249263867"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{224, 120}, {86, 21}}</string>
<reference key="NSSuperview" ref="249263867"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
<bool key="IBUIUserInteractionEnabled">NO</bool>
<string key="IBUIText">Label</string>
<reference key="IBUITextColor" ref="872501489"/>
<nil key="IBUIHighlightedColor"/>
<int key="IBUIBaselineAdjustment">1</int>
<float key="IBUIMinimumFontSize">1.000000e+01</float>
... ... @@ -164,6 +211,46 @@
</object>
<int key="connectionID">41</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">centerLat</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="561724603"/>
</object>
<int key="connectionID">50</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">centerLon</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="84945264"/>
</object>
<int key="connectionID">51</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">rmscale</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="1055911682"/>
</object>
<int key="connectionID">52</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">zoomLevel</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="971773762"/>
</object>
<int key="connectionID">53</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">truescale</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="916698432"/>
</object>
<int key="connectionID">57</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
... ... @@ -192,49 +279,67 @@
<reference key="object" ref="249263867"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="884551957"/>
<reference ref="254178060"/>
<reference ref="9368208"/>
<reference ref="287574730"/>
<reference ref="670366007"/>
<reference ref="296517720"/>
<reference ref="820332677"/>
<reference ref="336199844"/>
<reference ref="141815128"/>
<reference ref="30982843"/>
<reference ref="43404614"/>
<reference ref="401716894"/>
<reference ref="84945264"/>
<reference ref="561724603"/>
<reference ref="971773762"/>
<reference ref="1055911682"/>
<reference ref="916698432"/>
</object>
<reference key="parent" ref="360949347"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">42</int>
<reference key="object" ref="287574730"/>
<reference key="object" ref="336199844"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">43</int>
<reference key="object" ref="670366007"/>
<reference key="object" ref="561724603"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">45</int>
<reference key="object" ref="296517720"/>
<reference key="object" ref="84945264"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">46</int>
<reference key="object" ref="254178060"/>
<reference key="object" ref="30982843"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">47</int>
<reference key="object" ref="884551957"/>
<reference key="object" ref="971773762"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">48</int>
<reference key="object" ref="820332677"/>
<reference key="object" ref="43404614"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">49</int>
<reference key="object" ref="9368208"/>
<reference key="object" ref="1055911682"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">54</int>
<reference key="object" ref="141815128"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">55</int>
<reference key="object" ref="401716894"/>
<reference key="parent" ref="249263867"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">56</int>
<reference key="object" ref="916698432"/>
<reference key="parent" ref="249263867"/>
</object>
</object>
... ... @@ -255,13 +360,19 @@
<string>47.IBPluginDependency</string>
<string>48.IBPluginDependency</string>
<string>49.IBPluginDependency</string>
<string>54.IBPluginDependency</string>
<string>55.IBPluginDependency</string>
<string>56.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>FlipsideViewController</string>
<string>UIResponder</string>
<string>FlipsideView</string>
<string>{{376, 335}, {320, 480}}</string>
<string>{{1847, 294}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
... ... @@ -292,7 +403,7 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">49</int>
<int key="maxID">57</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
... ... @@ -315,6 +426,7 @@
<string>centerLat</string>
<string>centerLon</string>
<string>rmscale</string>
<string>truescale</string>
<string>zoomLevel</string>
</object>
<object class="NSMutableArray" key="dict.values">
... ... @@ -323,6 +435,7 @@
<string>UILabel</string>
<string>UILabel</string>
<string>UILabel</string>
<string>UILabel</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
... ...