Skip to content

oaky87/OSMDroidOfflineDemo

 
 

Repository files navigation

OSMDroidOfflineDemo

Playing around with offline maps and osmdroid ...

Screenshot of the application

Preparing map tiles

  1. Download and install Mobile Atlas Creator.

  2. Export tiles with the following settings:

    Mapsource: OpenStreetMap MapQuest Tile format: PNG Atlas Content: MapquestOSM

    Mobile Atlas Creator

  3. Extract the generated archive and make sure the inner folder is named MapquestOSM. Zip this folder to a file named tiles.zip. The folder structure of the archive should be like this:

└── MapquestOSM
    ├── 10
    │   └── 550
    │       └── 335.png
    ├── 11
    │   └── 1100
    │       └── 671.png
    ├── 12
    │   └── 2200
    │       └── 1343.png
    ├── 13
    │   ├── 4400
    │   │   ├── 2686.png
    │   │   └── 2687.png
    │   └── 4401
    │       ├── 2686.png
    │       └── 2687.png

Providing map tiles

Put the ZIP archive tiles.zip to the sdcard:

/mnt/sdcard/osmdroid/tiles.zip

The application will automatically find the archive and temporarily unpack the tiles as required.

For the first try there is a tiles archive in the tiles-example folder.

Referencing map tiles

The application needs to be configured with the correct tile source in order to match the folder name stored in the ZIP archive. This means MapquestOSM corresponds with this map view setting:

mapView.setTileSource(TileSourceFactory.MAPQUESTOSM);

The expected folder name is specified in TileSourceFactory.java.

References

About

Playing around with offline maps and osmdroid ...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%