mapbox / mapbox/mapbox-maps-flutter
Not able to place LocationPuck3D below map 3d models (specifically building extrusions)
Nessuno ha ancora preso questa issue.
- Lingua principale
- Dart
- Stelle
- 380
- Fork
- 204
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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<void> _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
I'm testing on an android device .
my mapbox version is: mapbox_maps_flutter: ^2.1.0
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo il comportamento di Android in mapbox_maps_flutter 2.1.0 usando _enableLocationComponent, la configurazione di LocationPuck3D e le impostazioni di LayerPosition e LayerSlot mostrate qui. Confronta il rendering del puck con il layer di estrusione degli edifici; il lavoro è completato quando viene stabilito se il puck può essere renderizzato sotto gli edifici 3D e l'ordine osservato viene documentato o corretto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- dart, flutter
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100