MapLoad error Failed to load tile - createPack success, getPack success, but map fails to show downloaded region
See original GitHub issueDescribe the bug
Tiles and sprites fail to load in a region contained within downloaded pack at a zoom level between min and max zoom level for downloaded pack
To Reproduce
- Delete app and re-install to ensure all mapbox tiles are cleared
- createPack
await MapboxGL.offlineManager.createPack({
name: 'pack_name',
styleURL: MapboxGL.StyleURL.Outdoors,
minZoom: 1,
maxZoom: 10,
bounds: [[-110, 40], [-112, 39]],
}, this.progressListener, this.errorListener);
- getPack (keep app open and then cut internet so getPack returns successfully - https://github.com/rnmapbox/maps/issues/2054)
const mapPack = await MapboxGL.offlineManager.getPack('pack_name');
- Attempt to show region contained within tiles pack at zoom level less than max level of tile pack
<View style={StyleSheet.flatten([styles.mapContainer, style])}>
<MapboxGL.MapView
ref={(ref) => (this._map = ref)}
style={styles.map}
styleURL={MapboxGL.StyleURL.Outdoors}
minZoomLevel={1}
maxZoomLevel={10}
>
<MapboxGL.Camera
ref={(ref) => (this._camera = ref)}
zoomLevel={8}
centerCoordinate={[-111, 39]}
bounds={{
ne: [-110, 40],
sw: [-112, 38],
}}
minZoomLevel={1}
maxZoomLevel={10}
animationDuration={10}
/>
</MapboxGL.MapView>
</View>
- Attempt to view map and note the following errors
ERROR Mapbox error MapLoad error Failed to load sprite: {"level": "error", "message": "MapLoad error Failed to load sprite: "}
ERROR Mapbox error MapLoad error Failed to load tile: {"level": "error", "message": "MapLoad error Failed to load tile: "}
- Enable network and navigate back to map - note that map tiles are visible as expected
Versions:
- Platform: iOS
- Platform OS: iOS 15.5
- Device: iPhone 12
- Emulator/ Simulator: yes
- Dev OS: MacOS 12.4
- @rnmapbox/maps: “@rnmapbox/maps”: “github:rnmapbox/maps#main”,
- MapboxImpl: $RNMapboxMapsImpl = ‘mapbox’
- Mapbox version: $RNMapboxMapsVersion = ‘~> 10.5.0’
- React Native Version: 0.64.3
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Downloaded Tile Region does not have tiles for highest ...
I was able to clearly see the details of the terrain in high zoom levels. Heres the tweaked code from the example: //...
Read more >Can't load an offline map after saving it - Esri Community
I need to be able to go do a different area in the map, view my offline maps, then show them after downloading...
Read more >Google maps api fails to load map tiles - Stack Overflow
So, finally this seems to be solved. It turns out that the problem was that I handled the included google maps javascript file...
Read more >Connect to Elastic Maps Service | Kibana Guide [8.5]
Elastic Maps Server does not serve raster tiles, needed by Vega, coordinate, and region map visualizations. You can use docker pull to download...
Read more >rnmapbox/Lobby - Gitter
I am testing by (a) downloading a map region with these settings: ... [javascript] 'Mapbox error', '[event]:Style [code]:-1 [message]:Failed to load tile ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like our bounds were reversed – we were using nw & se. Documentation specifies ne & sw. After adjusting bounds it works perfectly. EDIT: only works on IOS – offline mode appears to be broken on Android.
Same issue after trying the exact configuration in the example offlineManager implementation found here https://github.com/nitaliano/react-native-mapbox-gl/blob/master/example/src/components/CreateOfflineRegion.js
createPack
getPack
Map implementation