Mapbox added offline map support a few years back on their SDKs,
Found a couple medium articles on it, but no code to share. Wondering if there might be any mapbox FOSS replacements that offer this?
My current idea is probably: store the latitude and longitude of major cities in the world in a txt file, load it, and then estimate the distance based on the difference between them and the current photo, not sure about the space taken and the time consumed.