// Create point symbol with Numbers on Map
- (AGSCompositeSymbol *) inputStopSymbolWithNumber:(int) stopNumber {
AGSCompositeSymbol *cs = [AGSCompositeSymbol compositeSymbol];
// create outline
AGSSimpleLineSymbol *sls = [AGSSimpleLineSymbol simpleLineSymbol];
sls.color = [UIColor blackColor];
sls.width = 2;
sls.style = AGSSimpleLineSymbolStyleSolid;
// add number as a text symbol
AGSTextSymbol *ts = [[AGSTextSymbol alloc] initWithText:[NSString stringWithFormat:@"%d", stopNumber] color:[UIColor blackColor]];
ts.vAlignment = AGSTextSymbolVAlignmentMiddle;
ts.hAlignment = AGSTextSymbolHAlignmentCenter;
ts.fontSize = 18;
// create main circle
AGSSimpleMarkerSymbol *sms = [AGSSimpleMarkerSymbol simpleMarkerSymbol];
sms.color = [UIColor colorWithRed:238.0/255.0 green:195.0/255.0 blue:3.0/255.0 alpha:1.0];
sms.outline = sls;
// Dynamically set size of Text
//[sms setSize:CGSizeMake(labelStringSize.width+8,25)];
[sms setSize:CGSizeMake(25,25)];
sms.style = AGSSimpleMarkerSymbolStyleCircle;
[cs addSymbol:sms];
[cs addSymbol:ts];
return cs;
}
No comments:
Post a Comment