1

I already posted a question here: Android - How to improve osmdroid offline map performance in term of reponse time And the solution was using .gemf file.

Now instead of using .zip file, I'm using .gemf file (~200MB: zoom level 12-17, .PNG).

It takes around 1.50second to initialize my map with zoom level 16.

Android 4.4.2 - 1.3GHz cortex quadcore - 1GB Ram - NO Google Play Services.

Maybe there are some way to improve its performance? Like moving .gemf file to internal memory (then how to configure in android?) or something else?

Community
  • 1
  • 1
Anh-Tuan Mai
  • 1,129
  • 19
  • 36

2 Answers2

1

Try using sqlite. 1.5 seconds really isn't that bad. According to osmdroid, they recommend sqlite.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
spy
  • 3,199
  • 1
  • 18
  • 26
  • I tried .sqlite file then tested 10 times. Gemf file gave a light better performance. Anyway, thanks for your suggestion. – Anh-Tuan Mai Jun 25 '15 at 14:37
0

An alternative is to put your tiles files directly at the location expected by osmdroid caching system.

Unzip your zip file, add ".tiles" extension to all tiles files, and put the whole unzipped directory inside osmdroid/tiles/" dir.

If you already used osmdroid with an online tile source on your device, this directory already exists.

Another solution is to use OSMBonusPack CacheManager.

MKer
  • 3,430
  • 1
  • 13
  • 18
  • Although there's nothing technically wrong with this, caution should be taken for large data sets. Too may files in a directory will cause file system performance issues. – spy Jul 11 '15 at 23:41