iphone - Assigning lat long to CLLocation giving error not accepting any format -
i giving lat long cllocation in way.
cllocation *loc = [[cllocation alloc]init]; loc.coordinate.latitude = [slat floatvalue]; loc.coordinate.longitude = [slng floatvalue]; coming
nsmutabledictionary *locat = [dictloc valueforkey:@"location"]; slat = [locat valueforkey:@"lat"]; slng = [locat valueforkey:@"lng"]; showing correct values in console, kills when allocated cllocation. please guide above. thanks.
you can value in cllocationcoordinate2d object bellow...
cllocationcoordinate2d location; location.latitude = [slat doublevalue]; location.longitude = [slng doublevalue]; or try retain string bellow..
slat = [locat valueforkey:@"lat"]; [slat retain]; slng = [locat valueforkey:@"lng"]; [slng retain]; and assign cllocation
hope helpful you....
Comments
Post a Comment