• <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.addMarker Function

Format
markerId = map_name.addMarker(latitude, longitude);
Description
The Map.addMarker function creates a new marker at the position defined by latitude and longitude and adds the new marker to the Map object named map_name. Initially the marker will have the default red and black marker icon and no description.
You can customize the marker icon using the function Map.setMarkerText or Map.setMarkerImage. You can add a description of the marker using Map.setMarkerDescription. The description will appear in the marker list and in a popup when the user taps on the marker.
Return Value
The function returns the identifier of the new marker which may be used in subsequent calls to Map.removeMarker, Map.setMarkerText, Map.setMarkerImage, Map.setMarkerDescription Map.setMarkerOnClick, Map.setMarkerOnClickInfoWindow, Map.setMarkerOnDrag, Map.setMarkerLocation, Map.getMarkerLatitude, or Map.getMarkerLongitude.
Example
// Declare a map
Map mymap;

// Add a marker to the map at latitude 38.84839, longitude -76.931098
numeric markerId = mymap.addMarker(38.84839, -76.931098);

// Set marker popup text
mymap.setMarkerDescription(markerId, "CSPro Team at the U.S. Census Bureau");

// Show the map
mymap.show();
See also: Map Object, Map.removeMarker Function