Search code examples
androidofflineskmaps

Unable to download skobbler map for offline use - Android


This is the code I am using,

 int version=2;
 public void downloadMapsXMLForVersion(int version) {
        String url = SKPackageManager.getInstance().getMapsXMLPathForVersion(version);
   System.out.println(url);
         }

I have mentioned the correct key that I got from developer account during intialization.

The URL returned by it says

NoSuchKeyThe specified key does not exist.ngxmaps/versioned/full/v1/2/Maps.xmlBD6ED7C69819E911Ys14Q61AkJlyrWOsl+XW+DfFG+j6KCayLTb75s9hF3TizKf8mI7AlIWW8o1OL5Kbo/bDd/MeQv4=


Solution

  • First check that the SDK is online - initMapSettings.setConnectivityMode(SKMaps.CONNECTIVITY_ONLINE); - as the otherwise the xml download will fail.

    Then implement SKMapUpdateListener and check if onMapVersionSet is called - this means that the map version was read and now the download should work.