Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6869177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:31:32+00:00 2026-05-27T03:31:32+00:00

I have a project that has a requirement of displaying map data in offline

  • 0

I have a project that has a requirement of displaying map data in offline mode also. I have used OpenStreet maps for the same. I have saved map images(tiles) and each tile is referenced by a tilekey in database. I want to access these map tiles from database and use them accordingly.

Please suggest me.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:31:32+00:00Added an answer on May 27, 2026 at 3:31 am

    Map tiles in Osmdroid are provided by map tile providers. The default tile provider used by Osmdroid is MapTileProviderBasic. This provider extends MapTileProviderArray, which means that it is an array of a few other tile providers – when a tile is requested these tile providers are asked one by one for a tile image until one of them provides it. Take a look at the constructor of MapTileProviderBasic:

    public MapTileProviderBasic(final IRegisterReceiver pRegisterReceiver,
                  final INetworkAvailablityCheck aNetworkAvailablityCheck, 
                                            final ITileSource pTileSource) {
    
        super(pTileSource, pRegisterReceiver);    
        final TileWriter tileWriter = new TileWriter();
    
        final MapTileFilesystemProvider fileSystemProvider = 
            new MapTileFilesystemProvider(pRegisterReceiver, pTileSource);
        mTileProviderList.add(fileSystemProvider);
    
        final MapTileFileArchiveProvider archiveProvider = 
            new MapTileFileArchiveProvider(pRegisterReceiver, pTileSource);
        mTileProviderList.add(archiveProvider);
    
        final MapTileDownloader downloaderProvider = 
            new MapTileDownloader(pTileSource, tileWriter, aNetworkAvailablityCheck);
        mTileProviderList.add(downloaderProvider);
    }
    

    There are three map tile providers added to the array of providers, in this order:

    • MapTileFilesystemProvider – provides tiles from the file system (SD card directory)
    • MapTileFileArchiveProvider – provides tiles from archive in file system
    • MapTileDownloader – provides tiles by downloading them from the Internet (e.g. from OSM servers)

    So the MapTileProviderBasic looks for a given tile first in the file system, if the tile is not available then it looks for it in archive files and again if it is not available there it downloads the tile from the Internet.

    Ok, this is the default mechanism. If you want to change this mechanism to look for tiles stored in a DB then you can create you own class similar to MapTileProviderBasic. So your class could also extend MapTileProviderArray and just use other providers in the constructor. In Osmdroid there is a class DatabaseFileArchive which could probably help you in reading tiles from the DB.

    After creating your own tile provider you should use it instead of the default one. Map tile providers are attached to the MapView. Some of the constructors of MapView take MapTileProviderBase as an argument – you can use one of them to attach your own provider.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a sub-project 'commonUtils' that has many generic code-snippets used across the parent
I have a project that has several build configurations (FREE version, male-only, female-only, etc.).
I have a project that has a GUI (written in QT) and a command-line
I have a project that has components in several different directories and would like
We have a project that has been built in Flash and as3. It is
My use case is this... I have a project that has two production branches.
I have a client project that has posts assigned to their country of origin.
I have a maven project that has a set of library dependancies that are
I have created a project that uses scala that has some abstract classes definitions
I have been handed this project that has a large number of issues with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.