开发者

using sqlite data for dispalying the line on the map [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its cu开发者_如何学Gorrent form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I want to retrieve the longitudes and latitudes from sqlite data, and then add this data into the array and use this array data as fake_location for displaying the location of the user.

For solving this problem I am sending all my class TLocationManager.m file code -(id)init{ pointsArray = [[result componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] retain]; NSLog(@"This is the good think to have %@",pointsArray); pointsArrayIndex = 0; //NSLog(@"%@",pointsArrayIndex); oldLocationsIndex = 0;

    [result release];

    oldLocations = [[NSMutableArray alloc] init];
    return self;
}


For your first warning

[locations addObject:[NSString stringWithFormat:"%@,%@",dLongitude,dLatitude]];//over here i am getting warring  passing argument 1 of 'stringWithFormat:'from incompatible pointer type

replace it with

[locations addObject:[NSString stringWithFormat:@"%@,%@",dLongitude,dLatitude]];//over here i am getting warring  passing argument 1 of 'stringWithFormat:'from incompatible pointer type

Second, Where did you get componentsByJoiningString function for NSMutableArray.

 //Over here getting warring 'NSMutableArray' may not respond to'-componentsByJoiningString'    
 result = [locations componentsByJoiningString:@" "]; // same as `fake_location`function

replace it with

result = [locations componentsJoinedByString:@" "];

See NSArray Documentation..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜