user3589211
user3589211

Reputation: 99

Mapsforge mapfile for offline use under osmdroid

I want to use a downloaded Mapsforge map-file offline under osmdroid-api. But osmdroid only uses tile-maps (right ?). What's to do ? Is a conversion possible ?

Regards Wicki

Upvotes: 2

Views: 2838

Answers (2)

k3b
k3b

Reputation: 14755

Since osmdroid-5.2 the source code at https://github.com/osmdroid/osmdroid contain the demo app osmdroid-forge-app that demonstrates osmdroid-android + osmdroid-mapsforge to show offline map files.

Upvotes: 1

Asim.I
Asim.I

Reputation: 1097

No need for conversion.

  • if you have Mapsforge map file, then just put file in /sdcard/Yourfile.map
  • download this example,unpack & import as android project and change map file name, lat & long in HybridMap.java class constructor

change dubai.map to yourfile.map and lat/long according to Yourfile.map

    useMapsforgeTiles(Environment.getExternalStorageDirectory().getPath()+File.separator+"dubai.map");
    center(25.271139000000000000,55.307485000000040000);
  • if you don't have map file just download this map file and put in /sdcard/dubai.map

you can also download maps from

Upvotes: 4

Related Questions