• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Numeric Values
      • String Values
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
        • Map Statement
        • Map.show Function
        • Map.hide Function
        • Map.clear Function
        • Map.setTitle Function
        • Map.setBaseMap Function
        • Map.zoomTo Function
        • Map.showCurrentLocation Function
        • Map.saveSnapshot Function
        • Map.setOnClick Function
        • Map.getLastClickLatitude Function
        • Map.getLastClickLongitude Function
        • Map.addMarker Function
        • Map.removeMarker Function
        • Map.clearMarkers Function
        • Map.setMarkerImage Function
        • Map.setMarkerText Function
        • Map.setMarkerDescription Function
        • Map.setMarkerOnClick Function
        • Map.setMarkerOnClickInfoWindow Function
        • Map.setMarkerOnDrag Function
        • Map.setMarkerLocation Function
        • Map.getMarkerLatitude Function
        • Map.getMarkerLongitude Function
        • Map.addGeometry Function
        • Map.removeGeometry Function
        • Map.clearGeometry Function
        • Map.addTextButton Function
        • Map.addImageButton Function
        • Map.removeButton Function
        • Map.clearButtons Function
        • Mapping Engine
        • Base Map Specification
        • Offline Maps
      • Path
      • Pff Object
      • StringWriter Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Offline Maps

The default base map shown is the Google Maps road map, or Esri's Streets tile layer, depending on which mapping engine is used. Both of these maps require an Internet connection. You can instead use an offline map from a file stored on your device. Offline map files store map tiles which are images of pieces of a map at various levels of detail. Rather than downloading map images from an online map provider, CSPro will read the images directly from an offline map file.
Supported Files
CSPro supports the following formats for offline map files:
MBTilesAn open format originally developed by Mapbox but now widely used by many other systems. MBTiles can be exported from QGIS. You can also download MBTiles files created from Open Street Map data from the Humanitarian OpenStreetMap project. Only MBTiles containing image tiles (PNG or JPEG) are supported. Vector tiles are not supported.
ArcGIS Tile PackageTile packages exported from ArcGIS. See the ArcGIS Help for details. Tile packages (.tpk and .tpkx files) must be created using the ArcGIS Online/Bing Maps/Google Maps tiling scheme to be compatible with CSPro. PNG and JPEG tile formats are supported on all mapping engines, and Mixed packages are supported when using Leaflet.
Putting Maps on Devices
Once you have a map file you can copy it to your device via a USB connection. You can also download map files to your device using the syncfile command in your logic; however, since map files tend to be large, this may be slow. Map files can be placed anywhere on the device although it is most common to place them within a subfolder of your application's folder.
Specifying the Map to Use in the Case Listing
Use the BaseMap attribute in the [Files] section of the PFF file to provide the path to your device's offline map file. See Display the Case Listing on a Map for more info.
Specifying the Map to Use With the Map Object
When using the Map object in logic, use the Map.setBaseMap function to set the offline map.
File Size
The level of detail of an offline map is a big component of the file size. Levels of detail in offline maps start at zero, where the entire world is covered by a single image tile. Each successive level contains four times the number of images as the previous level. This means:
Level 1 contains 4 tiles
Level 2 contains 16 tiles
Level 3 contains 64 tiles, etc.
Level 20 is detailed enough to see individual buildings. At level 20 the entire world requires over a trillion tiles. By removing the last level of detail from your map, you reduce the size of the file by close to two-thirds.
Since offline map files may contain hundreds or thousands of images, they can become very large. The file size will depend on the extents of the map and the level of detail. It is not possible to store a map of the entire world, or even of an entire country, at a high level of detail on most devices. When creating your map files, you will need to adjust the extents and level of detail to ensure that the map files will not exceed the available storage space on your device. If your survey will be conducted over a large geographic area, you may need to provide separate maps for each interviewer or each team that only covers their assigned area.
See also: Map Object, Base Map Specification