tpk layer in the mmpk do not display

947
5
05-25-2018 06:32 AM
VeroniqueXie
New Contributor

Hi:

    

     I am trying to load a mmpk contains tpk layer, the loading is successful, except that the tpk layer does not diaplay, I use the sample code to load the mmpk, I use the most recent SDK 100.2.1

          

mMapPackage = new MobileMapPackage(mmpkFile);
// load the mobile map package asynchronously
mMapPackage.loadAsync();
// add done listener which will invoke when mobile map package has loaded
mMapPackage.addDoneLoadingListener(new Runnable() {
    @Override
    public void run() {
        // check load status and that the mobile map package has maps
        if(mMapPackage.getLoadStatus() == LoadStatus.LOADED && mMapPackage.getMaps().size() > 0){
            // add the map from the mobile map package to the MapView
            mMapView.setMap(mMapPackage.getMaps().get(0));
        }else{
            // Log an issue if the mobile map package fails to load
            Log.e(TAG, mMapPackage.getLoadError().getMessage());
        }
    }
});

   it looks like this, the highway is a vector layer in the mmpk, the .tpk (states layer) is missing.

   

     I can load it in the ArcGIS explorer, the result is perfect. it looks like this:

     

 Did anyone experience this problem? 

0 Kudos
5 Replies
AnttiKajanus1
Occasional Contributor III

Could you share the mmpk that you are using?

0 Kudos
VeroniqueXie
New Contributor

  Thanks for replying, here is the mmpk I used for test.

0 Kudos
AnttiKajanus1
Occasional Contributor III

Hi, this seems to work ok on .NET at least assuming this is what you were expecting. I'll ask someone to check it in Andoird.

0 Kudos
by Anonymous User
Not applicable

Hi Veronique,

I've tested this on my Android device (ASUS A002) on 100.2.1 and can't replicate the problem. Can I ask what device you're using? 

Thanks!

Trevor

0 Kudos
VeroniqueXie
New Contributor

Hi, Trevor:

      Thank you very much for your time. I test the code on a Nexus 6p, with android 8.1, and using the SDK of 100.2.1. 

0 Kudos