Guest User

Untitled

a guest
Jan 22nd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. // get voting districts for an area
  2.  
  3. SGEnvelope *envelope = [SGEnvelope envelopeWithNorth:40.613952
  4. west:-105.90271
  5. south:39.078908
  6. east:-103.513184];
  7.  
  8. [query setFilters:[NSArray arrayWithObject:SGContextFilterFeatures]];
  9. [query setFeatureCategories:[NSArray arrayWithObjects:SGFeatureCategoryLegislativeDistrict,
  10. SGFeatureCategorySchoolDistrict,
  11. nil]];
  12.  
  13. [client getContextForQuery:query
  14. callback:[SGCallback callbackWithSuccessBlock:
  15. ^(id response) {
  16. // you've got feature polygons!
  17. // to create an array of SGFeature objects:
  18. NSArray *features = [NSArray arrayWithSGCollection:response
  19. type:SGCollectionTypeFeatures];
  20. } failureBlock^(NSError *error) {
  21. // handle failure
  22. }]];
Add Comment
Please, Sign In to add comment