mapbox / mapbox/mapbox-maps-android

[queryRenderedFeatures] returns corrupted data/coordinates

Open
#2,619 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

## Environment

- Android OS version: Android 14 API 34
- Devices affected: all Android devices
- Maps SDK Version: 11.11.0

## Observed behavior and steps to reproduce

`queryRenderedFeatures` returns corrupted data. All coordinates are set to `[Infinity, -90.0]`
```
[queriedFeature: [feature: Feature{type=Feature, bbox=null, id=13683831, geometry=Polygon{type=Polygon, bbox=null, coordinates=[[Point{type=Point, bbox=null, coordinates=[Infinity, -90.0]}, Point{type=Point, bbox=null, coordinates=[Infinity, -90.0]}, Point{type=Point, bbox=null, coordinates=[Infinity, -90.0]}, Point{type=Point, bbox=null, coordinates=[Infinity, -90.0]}, Point{type=Point, bbox=null, coordinates=[Infinity, -90.0]}, Point{type=Point, bbox=null, coordinates=[Infinity, -90.0]}, Point{type=Point, bbox=null, coordinates=[Infinity, -90.0]}, Point{type=Point, bbox=null, coordinates=[Infinity, -90.0]}]]}, properties={"gmlid":"DENW40AL10007YW1"}}, source: buildings-source, sourceLayer: data, state: {}, featuresetFeatureId: [featureId: 13683831, featureNamespace: ]], layers: [buildings-layer], targets: []]
```

#### Steps to reproduce:

1. Add VectorSource(tiles) to the map
2. Add FillLayer to show the VectorSource on the map
3. Add tap gesture detector and call `queryRenderedFeatures` in it then log the Feature information
4. Tap on a Feature displayed using FillLayer added in step 2 and observe the output.
5. Double tap the map to zoom in and without delay tap on a feature and observe the corrupted output.

## Expected behavior

`queryRenderedFeatures` must return valid Feature information. (Valid coordinates)
```
[queriedFeature: [feature: Feature{type=Feature, bbox=null, id=13683831, geometry=Polygon{type=Polygon, bbox=null, coordinates=[[Point{type=Point, bbox=null, coordinates=[6.283922865986824, 50.895263784670675]}, Point{type=Point, bbox=null, coordinates=[6.284014396369457, 50.89525236517861]}, Point{type=Point, bbox=null, coordinates=[6.284005343914032, 50.89521155104521]}, Point{type=Point, bbox=null, coordinates=[6.283996291458607, 50.89517052540356]}, Point{type=Point, bbox=null, coordinates=[6.283960081636906, 50.8951747548528]}, Point{type=Point, bbox=null, coordinates=[6.283903084695339, 50.89518152197084]}, Point{type=Point, bbox=null, coordinates=[6.283900402486324, 50.89518173344328]}, Point{type=Point, bbox=null, coordinates=[6.283922865986824, 50.895263784670675]}]]}, properties={"gmlid":"DENW40AL10007YW1"}}, source: buildings-source, sourceLayer: data, state: {}, featuresetFeatureId: [featureId: 13683831, featureNamespace: ]], layers: [buildings-layer], targets: []]
```

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 on Android 14 with Maps SDK 11.11.0 using a VectorSource, FillLayer, and queryRenderedFeatures after zooming and tapping a feature. Start by tracing the queryRenderedFeatures path and inspect the returned Polygon coordinates; done means the queried feature contains valid coordinates instead of [Infinity, -90.0].

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.