Created
October 11, 2011 17:34
-
-
Save emilepetrone/1278780 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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