• <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
      • 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
        • Base Map Specification
        • Offline Maps
      • Path
      • Pff 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
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <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 which requires 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 Google Maps, 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 orginally 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 Open Street Maps project at https://www.hotosm.org. 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 files) must be created using the ArcGIS Online/Bing Maps/Google Maps tiling scheme to be compatible with CSPro.
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