Arcgis Map work with offline

472
2
05-24-2018 12:51 AM
GinoLim
New Contributor

Hi All,

I wanna to create an application to allow the user to perform check-in location with the ArcGIS offline map.

I have followed the tutorial using ArcGIS PRO to generates and putting the .mmpk file into the mobile internal storage directory. I manage to read the map but how to set a draggable marker on the map? 

private void setupMobileMap() {
    if (mMapView != null) {
        File mmpkFile = DIRECTORY;

        final MobileMapPackage mapPackage = new MobileMapPackage(mmpkFile.getAbsolutePath());
        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) {
                    mMapView.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();
    }
}
0 Kudos
2 Replies
AnttiKajanus1
Occasional Contributor III

Mobile Map Packages that you create using the desktop pattern with ArcGIS Pro are read-only at the moment. If you want to have geodatabases that you can edit, you have to cycle through Feature Services. 

Could you explain your use case a bit more? How is the check-in intended to be used? If you want to share the location with others/centralized system, you should be looking services pattern instead of the desktop one.

What comes to the editing, you can follow this sample but just find the layer from themap that you want to instead of generating it.

0 Kudos
GinoLim
New Contributor

Hi Antti Kajanus,

Appreciate your response, I got a task to build a mobile android application to allow the end user to save their current location by display a screen with the ArcGIS Offline Map and the marker where pinpoints the user current location. 

Here is the example:-

Image result for mobile save  location

0 Kudos