deepgis Posted May 10, 2017 Report Share Posted May 10, 2017 Respected All, I am learning online tutorials for webmapping using ArcGIS Runtime SDK for Android. I did all the steps according to the tutorial. I saved the .mmpk file on my sd card. But my device doesn't recognize it. I am not programmer so I think I need to correct the file path in the code. Need help. I am using the same as written below- Add a new method to load the mmpk file into a Map object and then update your MapView to display it. The file path used here may differ depending on how you loaded the file on your device. You may be required to alter the path to the file accordingly. Loading the map package file is an asynchronous process because you do not want to block the device while the file loads. If it fails to load the map package we fall back and show the online map. private void setupMobileMap() { if (mapView == null) { mapView = new MapView(); } String mmpkFile = "devlabs-package.mmpk"; final MobileMapPackage mapPackage = new MobileMapPackage(mmpkFile); mapPackage.addDoneLoadingListener(new Runnable() { @Override public void run() { // Verify the file loaded and there is at least one map if (mapPackage.getLoadStatus() == LoadStatus.LOADED && mapPackage.getMaps().size() > 0) { mapView.setMap(mapPackage.getMaps().get(0)); } else { // Error if the mobile map package fails to load or there are no maps included in the package setupMap(); } } }); mapPackage.loadAsync(); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.