mapbox / mapbox/mapbox-maps-flutter

Location puck is drawn below LineLayer

Open
#517 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

When I use:

```
mapboxMap?.location.updateSettings(
LocationComponentSettings(
pulsingEnabled: true,
showAccuracyRing: true,
puckBearing: PuckBearing.COURSE,
puckBearingEnabled: true,
),
);
```

And add a LineLayer:

```
await mapboxMap?.style.addLayer(
LineLayer(
id: 'line_layer',
sourceId: 'line',
lineColor: Colors.pinkAccent.value,
lineTrimOffset: [0.0, 1.0],
lineWidth: 5.0,
),
);
```

The result is that the puck is drawn below the line. I think the default should be that the puck is always on top. Is this a bug or am I missing a setting?
![image](https://github.com/mapbox/mapbox-maps-flutter/assets/644550/014a6fd4-a25d-4971-ac56-5ede1ff92156)

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 using location.updateSettings with the puck options shown and style.addLayer with the LineLayer example. Start by checking how the location puck and style layer ordering interact, then verify whether the puck renders above the line by default or whether an existing setting controls that order.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.