Permalink
Browse files

add: image based poi label;

  • Loading branch information...
1 parent c257832 commit 4438cd4a2532e00eda0a8f79efd4238959f59a11 @azeitler azeitler committed Mar 14, 2013
@@ -7,7 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
- 938CB69E16F0E1DB00727868 /* DefaultImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 938CB69D16F0E1DB00727868 /* DefaultImage.png */; };
9924CD80160B2B0000205D2E /* Default-568h@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 9924CD71160B2B0000205D2E /* Default-568h@2x~iphone.png */; };
9924CD83160B2B0000205D2E /* Default-Portrait@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 9924CD74160B2B0000205D2E /* Default-Portrait@2x~ipad.png */; };
9924CD84160B2B0000205D2E /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 9924CD75160B2B0000205D2E /* Default-Portrait~ipad.png */; };
@@ -50,6 +49,7 @@
9955EE6E1498E6070081D085 /* ConfigViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9955EE6B1498E6070081D085 /* ConfigViewController.mm */; };
9955EE711498E61F0081D085 /* PanicARKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9955EE701498E61F0081D085 /* PanicARKit.framework */; };
9955EE731498E63D0081D085 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9955EE721498E63D0081D085 /* MapKit.framework */; };
+ 996C41A616F1E831009C498A /* DefaultImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 938CB69D16F0E1DB00727868 /* DefaultImage.png */; };
9987614916E0F02A00EAE6CD /* PanicARKitResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9987614816E0F02A00EAE6CD /* PanicARKitResources.bundle */; };
9987615116E1220200EAE6CD /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 9987614F16E1220200EAE6CD /* Default-Landscape@2x~ipad.png */; };
9987615216E1220200EAE6CD /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 9987615016E1220200EAE6CD /* Default-Landscape~ipad.png */; };
@@ -334,7 +334,7 @@
9987614916E0F02A00EAE6CD /* PanicARKitResources.bundle in Resources */,
9987615116E1220200EAE6CD /* Default-Landscape@2x~ipad.png in Resources */,
9987615216E1220200EAE6CD /* Default-Landscape~ipad.png in Resources */,
- 938CB69E16F0E1DB00727868 /* DefaultImage.png in Resources */,
+ 996C41A616F1E831009C498A /* DefaultImage.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -319,26 +319,27 @@ - (void)createARPoiObjects {
theDescription:@"United Kingdom"
atLocation:[[CLLocation alloc] initWithLatitude:51.500141 longitude:-0.126257]
]];
-
+
// now add a poi (a graphic only - no text)
PARPoi* newPoi = nil;
newPoi = [[PARPoi alloc] initWithImage:@"DefaultImage"
atLocation:[[CLLocation alloc] initWithLatitude:51.500141 longitude:-0.126257]
];
-
+ newPoi.offset = CGPointMake(0, 0); // use this to move the poi relative to his final position on screen
[[PARController sharedARController] addObject:newPoi];
- // Add another POI, near our Headquarter
+ // Add another POI, near our Headquarters – display an image on it using a custom PoiLabelTemplate
newPoiLabel = [[poiLabelClass alloc] initWithTitle:@"Dom"
theDescription:@"Regensburger Dom"
+ theImage:[UIImage imageNamed:@"Icon@2x~ipad"]
+ fromTemplateXib:@"PoiLabelWithImage"
atLocation:[[CLLocation alloc] initWithLatitude:49.019512 longitude:12.097709]
];
[[PARController sharedARController] addObject:newPoiLabel];
NSLog(@"Number of PAR Objects in SharedController: %d", [[PARController sharedARController] numberOfObjects]);
-
- _hasARPoiObjects = YES;
-}
+
+ _hasARPoiObjects = YES;}
@end

0 comments on commit 4438cd4

Please sign in to comment.