TKPlacesQuery

@interface TKPlacesQuery : NSObject <NSCopying, NSMutableCopying>

A query object used for fetching specific collections of TKPlace objects.

To perform regional queries, use either quadKeys (preferred) or bounds property to specify the area of your interest.

  • Search term to use. Usable for searching through English and localised names.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *searchTerm;

    Swift

    var searchTerm: String? { get set }
  • Desired levels of Places. Each place has a level property that describes the type of the place by administration level. You can see supported levels in TKPlaceLevel enum.

    Note

    Matches objects in ANY of the requested levels.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TKPlaceLevel levels;

    Swift

    var levels: TKPlaceLevel { get set }
  • Listed map quad keys to query. Quad key represents map tile coordinate using Mercator (Google/Bing) projection. For details see Bing Maps docs or maptiler.org .

    Note

    Length: 118. All requested quad keys should be of the same length.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSArray<NSString *> *quadKeys;

    Swift

    var quadKeys: [String]? { get set }
  • Desired area of the map, specified by south-west and north-east point in degrees.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) TKMapRegion *bounds;

    Swift

    var bounds: TKMapRegion? { get set }
  • Division of each map tile when spreading. Use mapSpread when you want to display the places on the map. The area is subdivided into more areas so places cover map equally.

    Note

    Accepted values: 03. Implicit value is 0.

    Warning

    Value of limit must be divisible by 4^mapSpread.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSNumber *mapSpread;

    Swift

    var mapSpread: NSNumber? { get set }
  • Array of the desired Category slugs.

    Note

    Matches Places having ALL of the requested categories. Switching to ANY is possible by using the categoriesMatching property.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TKPlaceCategory categories;

    Swift

    var categories: TKPlaceCategory { get set }
  • Flag controlling the matching rule for categories.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TKPlacesQueryMatching categoriesMatching;

    Swift

    var categoriesMatching: TKPlacesQueryMatching { get set }
  • Plain-text array of the desired Tag keys. Each place can have multiple tags which describe it or it’s properties. Tags are used in query to filter places.

    Note

    Matches Places having ALL of the requested tags. Switching to ANY is possible by using the tagsMatching property. See the list of available tags .

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSArray<NSString *> *tags;

    Swift

    var tags: [String]? { get set }
  • Flag controlling the matching rule for tags.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TKPlacesQueryMatching tagsMatching;

    Swift

    var tagsMatching: TKPlacesQueryMatching { get set }
  • Desired identifiers of parent nodes.

    Note

    Matches Places having ALL of the requested parents. Switching to ANY is possible by using the parentIDsMatching property.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSArray<NSString *> *parentIDs;

    Swift

    var parentIDs: [String]? { get set }
  • Flag controlling the matching rule for parentIDs.

    Declaration

    Objective-C

    @property (assign, readwrite, atomic) TKPlacesQueryMatching parentIDsMatching;

    Swift

    var parentIDsMatching: TKPlacesQueryMatching { get set }
  • Minimum rating of the queried Places.

    Note

    The minimum value is 0.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSNumber *minimumRating;

    Swift

    var minimumRating: NSNumber? { get set }
  • Maximum rating of the queried Places.

    Note

    The maximum value is 10.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSNumber *maximumRating;

    Swift

    var maximumRating: NSNumber? { get set }
  • Maximum number of results returned.

    Note

    The default value is 10. Accepted values: 0512.

    Note

    If multiple quad keys specified, the limit applies to each map tile separately.

    Warning

    The value requested must be divisible by 4^mapSpread.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSNumber *limit;

    Swift

    var limit: NSNumber? { get set }
  • Offset index of the place to start with. Practically usable as paging.

    Note

    The default value is 0. Accepted values: 010000.

    Note

    Setting a limit of 512 and offset 512 effectively returns the second page of results.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSNumber *offset;

    Swift

    var offset: NSNumber? { get set }