Skip to content

Instantly share code, notes, and snippets.

@emilepetrone
Created October 11, 2011 17:34
Show Gist options
  • Save emilepetrone/1278780 to your computer and use it in GitHub Desktop.
Save emilepetrone/1278780 to your computer and use it in GitHub Desktop.
// get a record's location history
[client getHistoryForRecord:@"recordID"
inLayer:@"com.simplegeo.example"
limit:nil // optional limit
cursor:nil // for pagination
callback:[SGCallback callbackWithSuccessBlock:
^(id response) {
// you've got location history!
// to create an array of SGPoint objects...
NSArray *locations = [NSArray arrayWithSGCollection:response
type:SGCollectionTypePoints];
} failureBlock:^(NSError *error) {
// handle failure
}]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment