View Full Version : Help with offline bundle maps

12.01.2016, 15:22
Hello Skobbler community

I am trying to implement a bundled offline map functionality in my app. I want the user to be able to switch between a couple of pre-downloaded maps that are bundled in the app from the start. I have read your documentation about this subject, but I cant't really grasp how to implement it.

For example if I place my downloaded maps in the PreinstalledMaps/v1/20150413/package/ folder, what is the path that the function addOfflineMapPackageNamed need?
Also the folder where the application lies on the simulator, for example, changes path with every build of the application. How can you get an static path?

I would really like some help with a code example in swift how to do this. :D

Thanks for the help!

16.01.2016, 13:51

You don't need to call addOfflineMap... when you have those files in your .zip (at least in Android) ..

Everything should work fine this way .. just remember that you need not only .skm files in your package folder, but also .ngi, .ngi.dat, .txg as well ..

20.01.2016, 12:21
Thanks mz87 for the answer!
Additional information: for the offline packages, the only mandatory file is the .skm. The ".ngi" and ".ngi.dat" are used only for searches, and the ".tgx "textures are used for better display of a country on a high zoom level.

26.01.2016, 17:44
Thanks! I have successfully added the prebundled maps and it works great.

One question though, when i flip connectivityMode from offline to online the caching of the map acts weird (on country maps that are not prebundled).
Roads that are in the viewable map will not load and street addresses will not be drawn.

Is there something else I have to do when going from offline to online?

EDIT: I was in SKMapDetailLevel.Light, that seams to be the problem.

Put now another question has arose, I have added: map.settings.poiDisplayingOption.remove(.Important ), but the POI are still showing on the map. Is there something else that I need to add to remove POIs?

02.02.2016, 09:10
I fiddled around with the POI some more and now I have it configured the way I wanted to.

04.02.2016, 16:17
Using the light maps "SKMapDetailLevelLight" you won't have POI data and the maps will be smaller in size.