maplibre-react-native
maplibre-react-native copied to clipboard
Offline Maps not loading after couple weeks anymore
I can download a region for offline use and it works very well. But after 1-2 weeks, I believe, the region downloaded doesn't load properly on all zoom levels. The map is still available in the offline manager and the area loads when zoomed out. But when you zoom in, the paths & information that only appear when zoomed in don't load anymore.
I do provide the zoom levels when downloading:
{
name: id,
styleURL: encodeURI("https://__myserver__/style.json"),
minZoom: 10,
maxZoom: 14,
bounds: [bounds[0], bounds[1]],
},
but then zoom levels 13-14 won't load, only 10-12 (repeating myself here sorry).
Any idea if there's any fix for this? or how to properly debug? Much appreciated 😄
Is it possible there are cache headers that are being applied? If I remember correctly, the offline manager may look at those headers.
Thanks for your response :)
That's actually a good idea I haven't thought of. I did some testing and I believe my response headers don't contain any maximum caching policy, ttl, or anything that could be interpreted by Maplibre.
I tried the following requests:
curl -I https://___my_server_url___/styles/retro/style.json curl -I http://___my_server_url___/data/openmaptiles/0/0/0.pbf
This is the response I got:
content-type: application/json; charset=utf-8
content-length: 31650
access-control-allow-origin: *
etag: W/"7ba2-Z5jEfKbfjNMMnrAMhOI2XbIgsj4"
date: Wed, 08 Mar 2023 15:11:58 GMT
vary: Accept-Encoding
x-cache: Hit from cloudfront
via: 1.1 xxx.cloudfront.net (CloudFront)
x-amz-cf-pop: MXP64-P1
x-amz-cf-id: qFA6tOT-3FBChH71zOjkR18dFDFSMr60h7p7wX0TCEkOlW1142ppsg==
age: 7022
and
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/x-protobuf
Content-Encoding: gzip
Last-Modified: Sun, 08 Jan 2023 14:12:59 GMT
Content-Length: 45235
ETag: W/"b0b3-niPuHiL/znckTiG+XnMiubntoIo"
Date: Wed, 08 Mar 2023 15:10:57 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Is there any update on this issue? I'm working on something connected, where tiles are reported to disappear after some weeks.
Are you still experiencing this? We would need more input and some kind of reproduction. I'm also suspecting this issue might rather belong into the MapLibre Native repository.
Closing for missing feedback. Its most likely problem with the individual style/tiles setup.