mapbox / mapbox/mapbox-maps-flutter

Not able to place LocationPuck3D below map 3d models (specifically building extrusions)

Offen
#660 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Dart
Sterne
380
Forks
204
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I'm currently using the Mapbox Standard style, but I've attempted to create a custom style where I added a layer for building extrusions. However, the issue persists— my LocationPuck3D still renders above the building extrusions, despite my efforts.

I used the following code to try to move the LocationPuck3D layer below the building extrusions:

` _mapboxMap?.style.moveStyleLayer('mapbox-location-model-layer', LayerPosition(below: 'building-extrusion'));`

This did indeed move the layer but the model was still displayed over the buildings.

additionally, I’ve tried configuring the LocationPuck3D slot in the LayerSlot.MIDDLE but it didn't work, I tried specifying the layerBelow parameter directly in the settings, but neither approach has worked:

```
Future _enableLocationComponent() async {
_mapboxMap?.location.updateSettings(
LocationComponentSettings(
locationPuck: LocationPuck(
locationPuck3D: LocationPuck3D(
modelUri:
"https://raw.githubusercontent.com/Log-Mushun/TSP_models/main/Truck_pkg_1_glb.glb",
modelScale: [1, 1, 1],
modelScaleMode: ModelScaleMode.MAP,
),
),
enabled: true,
puckBearingEnabled: true,
slot: LayerSlot.MIDDLE,
//layerBelow: 'building-extrusion', (I also tried this)
),
);
}
```


So I wanted to see if LayerSlot.BOTTOM works and it looks weird, It's like the puck model appears under the roads but still above the buildings, with a theme that has a custom layer for 3d buildings the same thing happens



![bottom](https://github.com/user-attachments/assets/9dd4fd87-fcaf-4d10-807f-05b963dd446b)

I'm testing on an android device .

my mapbox version is: mapbox_maps_flutter: ^2.1.0

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das Android-Verhalten in mapbox_maps_flutter 2.1.0 mit _enableLocationComponent, der LocationPuck3D-Konfiguration sowie den hier gezeigten Einstellungen für LayerPosition und LayerSlot nachzustellen. Vergleiche die Darstellung des Pucks mit dem Layer für Gebäudeextrusionen; abgeschlossen ist die Aufgabe, wenn festgestellt wurde, ob der Puck unter 3D-Gebäuden gerendert werden kann, und die beobachtete Reihenfolge dokumentiert oder behoben wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart, flutter
Bereich
mobile
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.