Guest User

Untitled

a guest
Jan 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. // get records near a point
  2.  
  3. SGStorageQuery *query = [SGStorageQuery queryWithPoint:[SGPoint pointWithLat:37.772445 lon:-122.405913]
  4. layer:@"com.simplegeo.example"];
  5.  
  6. [client getRecordsForQuery:query
  7. callback:[SGCallback callbackWithSuccessBlock:
  8. ^(id response) {
  9. // you've got records!
  10. // to create an array of SGStoredRecord objects...
  11. NSArray *records = [NSArray arrayWithSGCollection:response
  12. type:SGCollectionTypeRecords];
  13. } failureBlock^(NSError *error) {
  14. // handle failure
  15. }]];
Add Comment
Please, Sign In to add comment