Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • MobileMap uses a specific directory structure which must be followed closely. This directory structure can be implemented on a device's internal SD card, but is typically implemented on an external SD card.

  • The folder structure for MobileMap can be created in one of 3 different ways:

    • Create the folder structure directly on your mobile device using the default file manager on your device

    • Connect your mobile device to your PC using a USB cable and then use Windows Explorer to create the folder structure on your device (e.g., This PC > Galaxy Tab Active > Card)

    • Remove the MicroSD Card from your device and insert it into your PC (using an SD Card adapter) then use Windows Explorer to create the folder structure on the card (e.g., Card (D:)). If base map TPKs are available, copy them into the TPK folder for the appropriate project folder. Finally, remove the MicroSD card from your PC and reinsert it into your device then power on your device.

  • The folder structure should look this:

    • SD Card

      • MobileMap

        • default

        • project1

          • TPK

          • SHP

        • project2

          • TPK

          • SHP

  • Start by creating a parent MobileMap data folder called MobileMap.

  • Within the MobileMap folder create one subfolder for each project or 'map cache'.  Some users create new map cache folders for each geographic area where they work.  Other users create different map cache folders for different types of work, based on the base map data they like to have displayed when performing that work.  Still others use a single map cache for all of their work.  The strategy will depend on the volume of data that you need, the number of distinct geographic areas where you work, the degree to which larger work areas are separated into regions or other groups, etc.  For this example we will create two map caches, one for Washington and the other for Oregon.

  • For each map cache folder (e.g., sdcard\MobileMap\region1), create two subfolders, TPK and SHP.

  • Add shapefiles to the SHP folder and TPKs to the TPK folder.

    • Note that Shapefiles must be projected into WGS 1984 Web Mercator (auxiliary sphere) to display correctly in MobileMap.

    • Shapefiles names should not include spaces or special characters.

    • There is a known bug in MobileMap that prevents proper display of date fields in Shapefiles. If dates are needed, they will need to be converted to text. To do this, follow these steps:

      • Create new text field

      • Calculate the text representation for the date by using field calculation capabilities in ArcMap or ArcPro (e.g., Datefield = [Orig_Date]). This will store dates as text in the format M/D/YYYY (e.g., ‘1/23/2019’)

...

  1. Sign in to ArcGIS (Actions > SIGN IN TO ARCGIS)

  2. Open the Download Base Map tool (Actions > Download Basemap)

  3. Select the layer you would like to download from the dropdown list

  4. Pan and zoom the map to the desired extent

  5. Select the maximum zoom level that you would like to download.

    • Note that if the optional step below is NOT followed, the TPK that is created will disappear when the the map is zoomed in beyond this maximum zoom level

  6. Select DOWNLOAD

    • Android 10+

      • If your device is running Android 10 or higher, you will be prompted for the download location. Select the ‘TPK’ folder within your desired project or the default folder (see folder structure discussion above). It is possible to create new folders if needed in this dialog. It is also possible to replace the auto-generated filename but the file must end in ‘.tpk’

      • Note: some users have recently reported issues with a recent (November 2022) upgrade to Samsung Tab Active 3 devices that is producing files that end in ‘.tpk.part’ rather than the standard ‘.tpk’ extension. We have attempted to address this in release 4.4.11, but if you find that this is causing a problem on your mobile device simply use a file manager to rename the TPK file from *.tpk.part to *.tpk. If you have any problems with this please contact our support team.

    • Android 9 and lower

      • If your mobile device is running Android 9 or lower, the file will be downloaded to your mobile device’s Download folder using the automatically generated file name.

      • Use a file manager (e.g., Files, MyFiles) to copy the TPK to a map cache's TPK folder (see instructions above for more information about file structure).

    • When MobileMap initiates the TPK export request, ArcGIS Online will report the estimated file size, and MobileMap will display these as a brief popup message. In our experience, file sizes below 50 MB tend to be successful, while file sizes above 150 MB frequently fail. It is not always clear why downloads fail when they do (e.g., request times out, server rejects request because it exceeds the maximum allowed number of tiles, download is corrupted in transit, etc.). When downloads fail, there may not be any confirmation of the failure - it may just freeze. In these cases, it will likely be necessary to reduce the extent or zoom level and repeat the download.

Watch YouTube Video:

...

Fixing the Overzoom

Optional - If you want to use the Download Base Map tool in MobileMap but do not want your TPK to disappear at higher zoom levels as described above, follow the steps below:

  • After step 7 above, and before saving your file into it's final destination it is possible modify the TPK to remove the maximum scale parameter.  This step involves several steps and can be thought of as an advanced technique. If you are not comfortable with manipulating files and file management in both a PC and Android please do not attempt this process. To remove the maximum scale parameter complete these steps:

    • Copy the TPK file produced in step 6 above to a PC where you have access to a 3rd party zip file creator application like 7-zip (the default Windows zip capabilities will not work correctly for this process) and a text editor (e.g., Notepad++, Atom)

    • Rename the TPK file extension from .tpk to .zip

    • Unzip the file

    • Navigate within the resulting folder to \servicedescriptions\mapserver

    • Open the mapserver.json file in a text editor and do the following

      • Search for the text "maxScale"

      • Wherever this property exists and is not set to zero, it will be set to the map scale that cooresponds corresponds to the zoom level you selected when building the TPK.  For example, if you selected zoom level 15, you will find one or more instances of  "maxScale": 18055.95 which indicates that the maximum map scale is 1:18,055.

      • Replace all instances of this with the map scale for zoom level 23, using: "maxScale": 70.53

      • Save the modified file

    • Re-zip the folder using your Zip applications, setting to no compression (e.g., compressionf format = 'storage').  This step is important, we don't want to actually compress the data, we just want to contain it into a single zip file

    • Replace the .zip file extsnesion extension to .tpk

    • Copy the zip resulting TPK file to the correct destination folder in MobileMap and test  

...

NOTE:  As of ArcMap version 10.2, it is no longer possible to create tile packages (TPKs) that contain ArcGIS Online hosted base maps or any other streaming sources such as NAIP imagery.  Prior to ArcMap 10.2 (e.g., ArcGIS 10.1) it was possible to include these data as inputs to tile packages.

From ArcPro, you are able to create TPKs from streaming sources other than ArcGIS Online hosted data, such as NAIP streamed from the APFO’s public ArcGIS Server.

Steps for creating a TPK in ArcMap

...

Image below shows example of completed inputs ready to be run:

...

To add streamed NAIP Imagery from the APFO’s public ArcGIS Server to ArcPro and cache it:

  1. On the Insert tab, select Add Connections > Server > New ArcGIS Server

  2. Paste this web address into the Server URL box and save: https://gis.apfo.usda.gov/arcgis/rest/services

  3. Load the CONUS NAIP imagery from the Catalog window (under the Servers folder) into a map

  4. Zoom to an area of interest, save the map

  5. Run the Create Map Tile Package tool with .tpk as the output format (see above)

Note, esri supplied reference data (not imagery) can be cached over NAIP imagery if road/place names on top of the imagery is desired.

Caching Custom Imagery in Arc Pro

Imagery acquired for a project and stored locally on a computer (not streamed from an online source) can be cached in Arc Pro via the following instructions.

• Load rasters to mosaic dataset (dataset can be in Web Mercator even if rasters are not). In the past, imagery has needed to be projected to Web Mercator prior to caching. As of Arc Pro 3.x, imagery does not projected Web Mercator, as long as the data frame coordinate system is set to Web Mercator prior to caching.
• Build Pyramids and Calculate Statistics as you load rasters in the mosaic dataset.
• Once the mosaic dataset has been created. Open the Attribute table of mosaic dataset from pro and field calculate Max PS (Max Pixel Size to something like 1000 or 5000).
• Open the properties of the mosaic dataset from catalog and change number of rasters to display in the properties from 20 to the number you have in the dataset
• Use the Mosaic Layer properties (ribbon button) to display “none” on the stretch type
• This should give you a color balanced, nice looking, raster image in Pro – cache this
• You can use the Mosaic Layer properties (ribbon button) to apply the Color Infrared version