mapbox / mapbox/mapbox-maps-ios
How to use `CustomGeometrySource`
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
New Feature
I'm looking for examples showing how to use CustomGeometrySource. I've posted this request as a form of question in the Discord forms [1][2] but requesting this here as a feature (any kind of help would be great).
I have a custom tile server that can take in requests of the form zoom/x/y serving points data, but it's not serving the data in any standard MVT format or GeoJSON. I want to be able to render the points data on my map as a layer using CircleLayer.
Digging through the source code I'm guessing that I'm suppose to use CustomGeometrySource for this, but there's no examples showing how you're suppose to use it.
Namely, what are you suppose to do inside of fetchTileFunction and cancelTileFunction? I'm guessing I should be fetching data from my server and adding it to the map using map.setCustomGeometrySourceTileData?
Why
There's no example showing how to use CustomGeometrySource and I'd like to understand how to use it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CustomGeometrySource API, especially fetchTileFunction, cancelTileFunction, and map.setCustomGeometrySourceTileData. Check how these entry points are intended to work with a custom tile server and CircleLayer. Done means adding an example that shows fetching tile data, handling cancellation, supplying tile data to the map, and rendering the points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- documentation, mobile-dev
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100