Download Sample Application

Locate an address or a place on the map using this sample. Simply specify an address or place in the search control in the upper right of the application and press enter. The resulting match candidates are then displayed as pushpins on the map. Click on these to view the address in the callout.

@property (strong) AGSLocator *locator;

//init arcgis locator and set delegate
self.locator = [AGSLocator locator];
self.locator.delegate = self;

//setup find parameters
AGSLocatorFindParameters *findParams = [[AGSLocatorFindParameters alloc] init];
findParams.outFields = @[@"*"];
findParams.outSpatialReference = self.mapView.spatialReference;
findParams.text = @"the address";
//execute find
[self.locator findWithParameters:findParams];

//process results
- (void)locator:(AGSLocator *)locator operation:(NSOperation *)op didFind:(NSArray *)results {

Sample Code

Feedback on this topic?