Guest User

Untitled

a guest
Jan 22nd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. // find places near a point
  2.  
  3. SGPlacesQuery *query = [SGPlacesQuery queryWithPoint:[SGPoint pointWithLat:37.772445 lon:-122.405913]];
  4.  
  5. [client getPlacesForQuery:query
  6. callback:[SGCallback callbackWithSuccessBlock:
  7. ^(id response) {
  8. // you've got Places!
  9. // to create an array of SGPlace objects...
  10. NSArray *places = [NSArray arrayWithSGCollection:response
  11. type:SGCollectionTypePlaces];
  12. } failureBlock^(NSError *error) {
  13. // handle failure
  14. }]];
Add Comment
Please, Sign In to add comment