View Full Version : Preinstalled maps not working for SDK 2.4

09.09.2015, 17:57
We have been trying to get preinstalled map working on our application for some time now but have been unsuccessful and we would like to find out if there is any thing we are doing wrong. Our app does not crash but there are no details shown on the map and all we see is a map with no details as per the attached image

Please see the steps we are taking below
1) We have the skm and txg, ngi and ngi.dat files for the cities we would like to add and have added it to the
folder within
SKMaps.zip which is located in the assets folder

2) We have changed our initialisation code to
public static void initializeLibrary(final Context context) {
final HajApplication app = (HajApplication)context.getApplicationContext();
// get object holding map initialization settings
SKMapsInitSettings initMapSettings = new SKMapsInitSettings();
// set path to map resources and initial map style
initMapSettings.setMapResourcesPaths(app.getMapRes ourcesDirPath(),
new SKMapViewStyle(app.getMapResourcesDirPath() + "daystyle/", "daystyle.json"));

final SKAdvisorSettings advisorSettings = initMapSettings.getAdvisorSettings();
advisorSettings.setAdvisorConfigPath(app.getMapRes ourcesDirPath() +"/Advisor");
advisorSettings.setResourcePath(app.getMapResource sDirPath() +"/Advisor/Languages");
advisorSettings.setLanguage(SKAdvisorSettings.SKAd visorLanguage.LANGUAGE_EN);
initMapSettings.setAdvisorSettings(advisorSettings );

initMapSettings.setPreinstalledMapsPath(app.getMap ResourcesDirPath() + "/PreinstalledMaps");
initMapSettings.setConnectivityMode(SKMaps.CONNECT IVITY_MODE_OFFLINE);

// Example of setting light maps
// initMapSettings.setMapDetailLevel(SKMapsInitSettin gs.SK_MAP_DETAIL_LIGHT);
// initialize map using the settings object

SKMaps.getInstance().initializeSKMaps(context, initMapSettings, API_KEY);

variable is an API_KEY is a static item with my API_KEY

10.09.2015, 15:26
Make sure that the /meta folder is also populated (in the .zip file)
Otherwise the map will not be rendered.