ARCGIS automatically show callout on map

| | August 18, 2015

I am wanting to show callouts when the map zooms to their coordinates. I have a table view controller that list all of the callouts and zooms to their location when pressed. This is the method:

-(void)handlePodNotifications:(NSNotification *) notification
{
if ([[notification name] isEqualToString:@"PodInteraction"])
{
    PodInteractionObject *interactionObject = [notification object];

    if([interactionObject.interactionName isEqualToString:@"ZoomToCrew"])
    {
        AGSGraphic *temp = (AGSGraphic *)interactionObject.interactionObject;
        CGPointMake(0, 0);
        double xcoord = [[temp valueForKey:@"lon"] doubleValue];
        double ycoord = [[temp valueForKey:@"lat"] doubleValue];
        AGSPoint *newPoint = [AGSPoint pointWithX:xcoord y:ycoord spatialReference:[AGSSpatialReference wgs84SpatialReference]];

        [self.mapView zoomToResolution:.2 withCenterPoint:newPoint animated:YES];
        [self.mapView allowCallout];


    }

}
}

I have looked on ARCGIS SDK for iOS and found a class reference for AGSCallout:

 - (void) showCalloutAt:(AGSPoint *) screenOffset:(CGPoint)
animated:(BOOL)

Every time i try to use this it says that this method is deprecated.

Leave a Reply