• <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>

Map.setBaseMap Function

Format
b = map_name.setBaseMap(base_map);
Description
The Map.setBaseMap function changes the base map that is displayed when the Map object named map_name is shown. Maps can use online base maps, which require an Internet connection to load, or can use offline base maps, which requires a map file stored on the device.
To specify an online map, use one of the following names as the base_map:
NameDescription
NormalStandard road map showing streets and outlines of some buildings.
SatelliteSatellite imagery.
HybridFeatures from the street map overlaid on satellite imagery.
TerrainPhysical map based on terrain information.
NoneEmpty base map. Only markers and buttons are shown.
To use an offline map, specify base_map using a string expression containing the filename of the offline map.
When no base map is set, the default base map will be calculated using defined rules.
Return Value
The function returns a logical value of 1 (true) if the base map was changed successfully and 0 (false) otherwise (for example, if the offline map is not found).
Example 1 (Online Map)
// Declare a map
Map mymap;

// Change the base map to satellite imagery
mymap.setBaseMap(Satellite);

// Display the map
mymap.show();
Example 2 (Offline Map)
// Declare a map
Map mymap;

// Change the base map to an offline map file
mymap.setBaseMap("Maps/Suitland.mbtiles");

// Display the map
mymap.show();
See also: Map Object, Base Map Specification, Offline Maps