Touchgeo Help

Layer Level Metadata for touchgeo

The following are the key names and value descriptions that must be set on each editable layer in the MapDotNet map file (.mapx).

  • LayerName – optional readable name for the layer that shows up in the legend
  • SQLColumnNameForID – required column name of the ID (PK) column (note: table is known via mapfile)
  • SQLColumnNameForCrmFK – optional column name in SQL referencing the CRM entity
  • SQLColumnNameForUserID - optional column name which receives (on inserts/updates) the client user id returned from the authentication service at login. This is required for filtering identify results and map features by logged-in user.
  • SQLColumnNameForDate - optional column name for a record time-stamp used with date range filtering (see touchgeo.enableDateRangeFiltering in isc.touchgeo.config.js for further configuration).
  • SQLColumnNameForDateStart - optional column name for a record date range used with date range filtering (see touchgeo.enableDateRangeFiltering in isc.touchgeo.config.js for further configuration).
  • SQLColumnNameForDateEnd - optional column name for a record date range used with date range filtering (see touchgeo.enableDateRangeFiltering in isc.touchgeo.config.js for further configuration).
  • CRMEntityName – the optional name of the entity associated with this layer. If this is not provided, then there is no associated CRM entity for this layer.
  • CRMFieldNameForID – the name of the unique ID field for the CRM entity
  • CRMFieldNameForUserID – optional field name of type EntityReference which receives (on inserts/updates) the client user id returned from the authentication service at login. This must be a CRM contact id GUID. This is not used for identify or map feature filtering - see SQLColumnNameForUserID.
  • CRMFieldNameForLatitude - optional latitude field that is populated for point features
  • CRMFieldNameForLongitude - optional longitude field that is populated for point features
  • PrimaryIdentifyReadable – human readable field description for the primary identify field
  • DefaultActive - if 'true', this layer will be selected in the layer manager at start-up
  • HideInLegend - if 'true' will not show in the legend but will show on the map
  • DisableCreate - if 'true' will prevent the creation of new records
  • DisableUpdate - if 'true' will prevent the updating of existing records
  • DisableDelete - if 'true' will prevent the deletion of existing records
  • ShapeIsReadonlyInUpdateMode - if 'true' the geometry of the record cannot be updated
  • DefaultShape - optional WKT geometry string that is loaded into a new feature
  • RolesWhereLayerIsUnavailable – optional comma-delimited list of roles to which this layer is unavailable. If unavailable, it will not show up in the legend, will not be identifiable, searchable or editable.
  • RolesWhereLayerIsNotEditable - optional comma-delimited list of roles to which this layer is not editable.
  • RolesWhereQueriesAreLimitedByUserID- optional comma-delimited list of roles to which identify and search queries are limited to records created/edited by the logged-in user. This option requires the SQLColumnNameForUserID be set and records must have this field populated with the creator or last-editor user id.
  • RolesWhereMapFeaturesAreLimitedByUserID- optional comma-delimited list of roles to which map features are limited to records created/edited by the logged-in user. This option requires the SQLColumnNameForUserID be set and records must have this field populated with the creator or last-editor user id.

Field Level Metadata for touchgeo

Once the table/entity-level metadata is in place at the layer level, enter one or more mappings which map a field to the SQL Server table and/or CRM entity. Each metadata entry will use a key in the form: “Mapping_???” (where the ??? are substituted with a helpful name for administration.) The application will look for all keys that begin with "Mapping_". Each of these mapping key/values are entered at the layer level.

Each mapping must adhere to the following example format (example):
Key: “Mapping_Acerage”
Value: “DisplayName$Acerage, Type$numeric, SQLColumnName$acerage, CRMFieldName$new_acerage, Editable$true”

These are the supported keys:

  • DisplayName – is the human-readable name of the field used in identify and editing
  • Type – the data type
    • string
    • numeric
    • date (UTC date only with time truncated to 00:00)
    • datetime (UTC date plus time of day)
    • guid
    • bool
    • lookup - (supports lookups in this metadata file, or CRM entity reference lookups or CRM OptionSets)
    • photo - stores a uri to a photo resource in the cloud
    • phonenumber
    • hyperlink
  • SQLColumnName – the optional column name where this element is stored in SQL Server
  • CRMFieldName – the optional column name where this element is stored in CRM. If this is an EntityReference, see CRMLookupEntityName and CRMLookupTextField.
  • CRMLookupEntityName – optional lookup entity name if the lookup is an entity reference (if it is an optionset, this is not applicable)
  • CRMLookupTextField – optional field name holding lookup text values if the lookup is an entity reference (if it is an optionset, this is not applicable) - DEPRECATED (please use CRMLookupFieldNames)
  • CRMLookupFieldNames - optional @-delimited list of lookup fields. Ordinal position-0 is the display field. Ordinal position-1 is the value field used to populate a corresponding SQL column [if provided, see SQLColumnName] and to uniquely identify the correct EntityReference in CRM. You may specify additional fields for custom use.
  • LookupValues – optional @-delimited string of lookup string values in the form “Value1@Value2@Value(n)”. You need to set Type$lookup inorder for this to work.
  • Display– set to false to hide field in the editor (defaults to true)
  • ReadOnly - set to true if the field is read-only in the editor
  • Required - set to true if this is a required field
  • DefaultValue - set a default value that is populated on a new record creation (if type is "date" or "datetime" you can use "[now]" as a default)
  • PrimaryIdentify – true if this field is the primary one used in the identify callout. touchgeo looks for the first field that has this set to true.
  • LinkText - if the Type is "hyperlink", this text will be shown (as the link text) in the editor panel for the field value.