Skip to content

Instantly share code, notes, and snippets.

@viniciusmo
Created February 26, 2015 15:55
Show Gist options
  • Save viniciusmo/a930d2e2493d4d480d25 to your computer and use it in GitHub Desktop.
Save viniciusmo/a930d2e2493d4d480d25 to your computer and use it in GitHub Desktop.
-(void) testGeocode{
MLAddress *addr = [[MLAddress alloc] initWithStreet:nil
andBuildingNumber:nil
andNeighborhood:nil
andCity:@"São Paulo"
andState:@"SP"
andPostalCode:nil];
NSArray * addressesGeocoded = [MLAddressGeocoder geocodeWithToken:@"seu token" address:addr];
for (MLGeocodedAddress * addressGeocoded in addressesGeocoded) {
NSLog(@"%@ lat=%f lon=%f",addressGeocoded.address.city,addressGeocoded.point.latitude,addressGeocoded.point.longitude);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment