# MGLComputedShapeSourceDataSource

    @protocol MGLComputedShapeSourceDataSource <NSObject>

Data source for `MGLComputedShapeSource`. This protocol defines two optional methods for fetching data, one based on tile coordinates, and one based on a bounding box. Classes that implement this protocol must implement one, and only one of the methods. Methods on this protocol will not be called on main thread, they will be called on the caller’s `requestQueue`.

- `-featuresInTileAtX:y:zoomLevel:`

  Fetch features for a tile. This method will not be invoked on the main queue, it will be invoked on the caller’s `requestQueue`.

  #### Declaration

  Objective-C

      - (nonnull NSArray<MGLShape<MGLFeature> *> *)featuresInTileAtX:(NSUInteger)x
                                                                   y:(NSUInteger)y
                                                           zoomLevel:
                                                               (NSUInteger)zoomLevel;

  #### Parameters

  `x` | Tile X coordinate.
  `y` | Tile Y coordinate.
  `zoomLevel` | Tile zoom level.

  View Source on GitHub
- `-featuresInCoordinateBounds:zoomLevel:`

  Fetch features for a tile. This method will not be invoked on the main queue, it will be invoked on the caller’s `requestQueue`.

  #### Declaration

  Objective-C

      - (nonnull NSArray<MGLShape<MGLFeature> *> *)
      featuresInCoordinateBounds:(MGLCoordinateBounds)bounds
                       zoomLevel:(NSUInteger)zoomLevel;

  #### Parameters

  `bounds` | The bounds to fetch data for.
  `zoomLevel` | Tile zoom level.

  View Source on GitHub