Application crash on drowing Picture Marker Symbol

Discussion created by fsabri on Jun 27, 2011
Latest reply on Sep 13, 2011 by fsabri
Hi ,

i'm using "did click at point" to draw my Picture Symbol on the clicked point ,

my problem is the following :

- if i clicked anywhere in the map , i add the symbol to graphic layer and draw it without any problem , but if i clicked at the same location that i have already clicked before the application will crash ,

- some times before the application crash , a small dialog with a blue arrow shows up on the picture symbol , how to disable that dialog and why the application is crashing ??

below is my code and attached image for the blue arrow :

if (Clicked == NO)
self.view.userInteractionEnabled = FALSE;

HUD = [[MBProgressHUD alloc] initWithView:self.view];
[self.view addSubview:HUD];

HUD.delegate = self;
HUD.labelText = @"Ù?رجÙ? اÙ?اÙ?تظار";

[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];

[myGraphicsLayer removeAllGraphics];

AppDataObjectHelper* theDataObject = [self theAppDataObject];

point = mappoint;

theDataObject.XPoint = [NSString stringWithFormat:@"%.11lf",mappoint.x];
theDataObject.YPoint = [NSString stringWithFormat:@"%.11lf",mappoint.y];

url = [NSURL URLWithString:theDataObject.StreetLayerIndex];

IsStreetLayer = YES;

[self GetQuery:url mapPoint:point];


//create the callout template, used when the user displays the callout
AGSCalloutTemplate *calloutTemp = [[AGSCalloutTemplate alloc]init];

marker = [AGSPictureMarkerSymbol pictureMarkerSymbolWithImageNamed:@"pushpin.png"];

marker.xoffset = 5;
marker.yoffset = 5;
marker.hotspot = CGPointMake(-9, -11);

//create the graphic
AGSGraphic *graphic = [[AGSGraphic alloc] initWithGeometry:mappoint symbol:marker
attributes:nil infoTemplateDelegate:calloutTemp];

[calloutTemp release];

[myGraphicsLayer addGraphic:graphic];

self.mapView.callout.width = 250;

[graphic release];

[myGraphicsLayer dataChanged];

Clicked = YES;