mapbox / mapbox/mapbox-maps-flutter
iOS App Crashing When Loading RasterLayer
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Dart
- Estrellas
- 380
- Forks
- 204
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I'm trying to show a heatmap in my Flutter app with the help of RasterSource/Layers. It was working fine in 0.5.0 but after migrating to 2.3.0 it started crashing on iOS. The error thrown in xCode is:
Generate Mipmaps For Texture Validation [tex mipmapLevelCount](1) must be > 1
After some investigation I found that there is an issue when the loaded tiles have a size of 1x1. This is also confirmed in one of the comments on this StackOverflow post .
This is the code I'm using in Flutter just in case.
await style.addSource(
RasterSource(
id: 'overall_heatmap',
tiles: heatmap.tiles,
tileSize: 256,
scheme: Scheme.XYZ,
minzoom: heatmap.minZoom,
maxzoom: heatmap.maxZoom,
bounds: heatmap.bounds,
),
);
await style.addLayer(
RasterLayer(
id: 'heatmap',
sourceId: 'overall_heatmap',
rasterResampling: RasterResampling.LINEAR,
),
);
And this is my Flutter doctor result:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 14.6.1 23G93 darwin-arm64, locale en-CO)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] Connected device (4 available)
[✓] Network resources
• No issues found!
Thanks in advance for any help you can provide!
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza reproduciendo el fallo con la configuración proporcionada de RasterSource y RasterLayer en iOS, centrándote en un tile ráster cargado de tamaño 1x1. Después, sigue el manejo nativo de texturas ráster o mipmaps utilizado por esta integración de Flutter; el trabajo estará terminado cuando la configuración ya no provoque un fallo al cargar un tile de este tipo y la regresión esté cubierta por una prueba adecuada si el repositorio proporciona una.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- dart, flutter, ios
- Área
- mobile-dev
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 25/100