mapbox / mapbox/mapbox-maps-ios

querySourceFeatures returns wrong type for 'cluster_id'

Open
#1,072 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
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:

Screenshot 2022-01-28 at 15 12 26

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.