AnsweredAssumed Answered

Order of fields in AGSPopupInfo

Question asked by s26761 on Feb 23, 2012
Latest reply on Feb 28, 2012 by njarecha-esristaff
Hello

I've set up the graphic's attributes as follows:

        NSMutableDictionary *attribs = [NSMutableDictionary dictionaryWithObject:@"title" forKey:@"title"];
        [attribs setValue:@"subtitle" forKey:@"subtitle"];
        NSString *strX = [NSString stringWithFormat:@"%lf", pt.x];
        NSString *strY = [NSString stringWithFormat:@"%lf", pt.y];
        [attribs setValue:strX forKey:@"x"];
        [attribs setValue:strY forKey:@"y"];
        graphic = [[AGSGraphic alloc] initWithGeometry:pt
                                                symbol:marker
                                            attributes:attribs
                                  infoTemplateDelegate:self.CalloutTemplate];
        [self.graphicsLayer addGraphic:graphic];

Hence, the order of graphic's attributes is as follows:

title
subtitle
x
y

However, the order of fields as per the code below doesn't follow the same as the above graphic's attributes.

    AGSPopupInfo *info = [AGSPopupInfo popupInfoForGraphic:graphic];

Instead the order is as follows:

title
y
x
subtitle

Anyone with a clue as to why the change in order of fields? How to make AGSPopupInfo follow the same order as the graphic's attributes?

Thanks.

Rgds
Ong CF

Outcomes