Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

annotation.index wrong if in the title or subtitle is a "," #18

Open
raissetto opened this issue Jan 9, 2017 · 1 comment
Open

annotation.index wrong if in the title or subtitle is a "," #18

raissetto opened this issue Jan 9, 2017 · 1 comment

Comments

@raissetto
Copy link

In Italy in the address field it is almost always present "," it is but 'used as a key field to create various fields including the index.

This method:
-(NSArray *)dropPinsWithData:(NSArray )data {
NSMutableArray
annotationArray= [NSMutableArray new];
for (int i = 0; i < data.count; i++) {
NSDictionary *d = data[i];
NSMutableString *line = [NSMutableString new];
[line appendString:[NSString stringWithFormat:@"%@, ", [d valueForKey:kLongitude]]];
[line appendString:[NSString stringWithFormat:@"%@, ", [d valueForKey:kLatitude]]];
[line appendString:[NSString stringWithFormat:@"%@, ", [d valueForKey:kTitle]]];
[line appendString:[NSString stringWithFormat:@"%@, ", [d valueForKey:kIndex]]];
[line appendString:[NSString stringWithFormat:@"%@", [d valueForKey:kSubtitle]]];
[annotationArray addObject:line];
}

Add "," for separated string used by
HACQuadTreeNodeData HACDataFromLine(NSString *line)
{
NSArray *components = [line componentsSeparatedByString:@","];

In the subtitle field, putting an address like: "Corso Italy, 47"
This generates an error in the calculation of the various fields.

Currently I replaced the "," with the "|" to be used as a separator in the 2 methods mentioned above

@litoarias
Copy link
Owner

This is a mistake, when I have time I will solve it without fail, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants