Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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
- }]];
Add Comment
Please, Sign In to add comment