mapbox / mapbox/mapbox-maps-ios
querySourceFeatures returns wrong type for 'cluster_id'
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Xcode version: 13.2.1
- iOS version: latest
- Devices affected: IPhone 12, IOS Similator
- Maps SDK Version: 10.2.0
Observed behavior and steps to reproduce
I use the querySourceFeatures call from mapbox SDK to get the cluster_id value that I need to highlight the cluster on the map. But there is an issue with type conversion value for cluster_id in MapboxCoreMaps. The querySourceFeatures function returns the wrong type when cluster_id=1 (in MapboxCoreMaps, this value is converted to boolean type instead of number, i.e. now I get cluster_id=true ).
I have attached a screenshot for more details:
Expected behavior
I'm expecting to get the value of cluster_id as a numeric value.
Additional links and references
It seems to me that a similar issue was here: https://github.com/mapbox/mapbox-maps-ios/issues/726
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
Reproduce the issue with querySourceFeatures on the stated iOS and Maps SDK versions, focusing on how MapboxCoreMaps converts the cluster_id property. Review the related issue 726 for context. Done means cluster_id=1 is returned as a numeric value rather than true; no source file or test is named in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100