Results 1 to 2 of 2

Thread: Preinstalled maps not working for SDK 2.4

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Neuer skobbler
    Join Date
    09.09.2015
    Posts
    1

    Preinstalled maps not working for SDK 2.4

    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
    device-2015-09-09-141743 (1).jpg

    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
    PreinstalledMaps\v1\20141230\package\
    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);
    advisorSettings.setAdvisorVoice("en");
    initMapSettings.setAdvisorSettings(advisorSettings );

    // EXAMPLE OF ADDING PREINSTALLED MAPS
    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

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Make sure that the /meta folder is also populated (in the .zip file)
    Otherwise the map will not be rendered.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •