Skip to content

v2.0.7

Latest

Choose a tag to compare

@trasch trasch released this 16 Jul 20:38
5a8121e
Add the following methods to MapTile:

- isAncestorOf(_:): true if this tile is an ancestor of the given tile
- isDescendantOf(_:): true if this tile is a descendant of the given tile
- isRelated(to:): true if tiles are ancestors, descendants, or identical
- ancestors: all parent tiles from immediate parent to z=0
- descendants(atZoom:): all child tiles at a target zoom level
- contains(_:): true if a geographic coordinate falls within the tile's
  bounding box

These methods support tile pyramid navigation use cases such as
overzooming/underzooming vector tiles, tile coverage checks, and
spatial containment queries.