mapbox / mapbox/mapbox-maps-ios

Offline maps tile region boundaries

Open
#950 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple:
Dominant language
Swift
Stars
601
Forks
196
PR merge metrics
No merged PRs in 30d

Description

## New Feature

I'd like to be able to highlight the geographic region accounted for by any offline TileRegion in the TileStore. Using the method below, I can retrieve the center coordinate of the offline tile region, but I don't see any way to grab the northwest and southeast corners of the region boundary.

```
TileStore.default.allTileRegions { result in
switch result {
case let .success(tileRegions):
print(tileRegions)
for region in tileRegions {
TileStore.default.tileRegionGeometry(forId: region.id, completion: { result in
switch result {
case let .success(tileRegionGeometry):
print(tileRegionGeometry) //center point of region
default:
break
}
})
}
default:
break
}
}
```

## Why
As far as i can tell, I can retrieve the center point of a region in the TileStore, but not its boundary. The boundary would be useful as I could then let the user know whether they've already download the tiles for a given area.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with TileStore.default.allTileRegions and tileRegionGeometry(forId:), which the issue identifies as the current offline-region entry points. Trace what geometry is returned and how TileRegion data is exposed; the work is done when callers can obtain each region's boundary, including its northwest and southeast corners, to compare it with a requested area.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
api, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.