Skip to content

Instantly share code, notes, and snippets.

@emilepetrone
Created October 11, 2011 17:43
Show Gist options
  • Save emilepetrone/1278816 to your computer and use it in GitHub Desktop.
Save emilepetrone/1278816 to your computer and use it in GitHub Desktop.
// find places near a point
SGPlacesQuery *query = [SGPlacesQuery queryWithPoint:[SGPoint pointWithLat:37.772445 lon:-122.405913]];
[client getPlacesForQuery:query
callback:[SGCallback callbackWithSuccessBlock:
^(id response) {
// you've got Places!
// to create an array of SGPlace objects...
NSArray *places = [NSArray arrayWithSGCollection:response
type:SGCollectionTypePlaces];
} failureBlock:^(NSError *error) {
// handle failure
}]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment