Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // get voting districts for an area
- SGEnvelope *envelope = [SGEnvelope envelopeWithNorth:40.613952
- west:-105.90271
- south:39.078908
- east:-103.513184];
- [query setFilters:[NSArray arrayWithObject:SGContextFilterFeatures]];
- [query setFeatureCategories:[NSArray arrayWithObjects:SGFeatureCategoryLegislativeDistrict,
- SGFeatureCategorySchoolDistrict,
- nil]];
- [client getContextForQuery:query
- callback:[SGCallback callbackWithSuccessBlock:
- ^(id response) {
- // you've got feature polygons!
- // to create an array of SGFeature objects:
- NSArray *features = [NSArray arrayWithSGCollection:response
- type:SGCollectionTypeFeatures];
- } failureBlock^(NSError *error) {
- // handle failure
- }]];
Add Comment
Please, Sign In to add comment