you have an application that successfully finds your GPS location, but I need to compare this GPS with a list of GPS locations, if both of them are the same, then you get a bonus.
I thought it worked for me, but it seems not.
I have "newLocation" as the place where you are, I think the problem is that I need to be able to share the long and lat data of newLocation.
So far Ive tried this:
NSString *latitudeVar = [[NSString alloc] initWithFormat:@"%g°", newLocation.coordinate.latitude]; NSString *longitudeVar = [[NSString alloc] initWithFormat:@"%g°", newLocation.coordinate.longitude];
An example of a list of GPS locations:
location:(CLLocation*)newLocation; CLLocationCoordinate2D bonusOne; bonusOne.latitude = 37.331689; bonusOne.longitude = -122.030731;
and then
if (latitudeVar == bonusOne.latitude && longitudeVar == bonusOne.longitude) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"infinite loop firday" message:@"infloop" delegate:nil cancelButtonTitle:@"Stinky" otherButtonTitles:nil ]; [alert show]; [alert release]; }
this results in the error 'invalid operands for binary files' have rack NSstring and CLlocationDegrees'
Any thoughts?
Kiksy source share