Skip to main content

Import Attribute Set from JSON

The concept of Attribute Sets came from the fact that some information is very often entered multiple times during surveys. For example, if there was a need to gather information about the colours of cars parked along the streets – instead of typing the colour names each time you open the form – you would probably prefer to have a predefined list of colours and when entering the data you would simply choose the required value from the dropdown list.

Utilising this functionality, you can make your data more consistent, typo-free and better structured by simply linking your layer field with the attribute set field.

When to Use Attribute Sets in Mapit Spatial?

You need to use attribute sets in 3 cases:

  • To create dropdown lists of predefined values (TEXTs, INTEGERs, DOUBLEs)
  • To create multi-selection lists of predefined values
  • To utilise barcode and QR scanner for TEXT fields

Import process

To import an attribute set from JSON in Mapit GIS, your file must follow the correct structure and format specifications. The important thing is that the file extension must be .json.

Important Compatibility Note: JSON structures from previous Mapit versions may not be fully compatible with the current version. Please ensure all field properties match the required standard specified below.

Your JSON file must contain the following elements:

name - The name of your attribute set description - A brief description of the attribute set fields - An array containing your field definitions

Supported Data Types

Mapit GIS supports the following custom data types:

TEXT - For text values with a single selection dropdown INTEGER (LONG) - For whole numbers with a single selection dropdown DOUBLE- For decimal numbers with a single selection dropdown BARCODE - For barcode/QR code fields MULTISELECT - For multiple selection dropdown

Single Selection Dropdowns: Use TEXT, INTEGER (LONG), or DOUBLE data types with a values array to create single selection dropdown lists. Users will be able to select only one value from the predefined options.

Multiple Selection Dropdowns: Use the MULTISELECT data type with a values array to create multiple selection dropdown lists. Users will be able to select multiple values from the predefined options.

Field Structure Requirements

Each field must include:

name - The field name dataType - One of the supported data types listed above isStyling - Boolean value (typically false) defaultValue - Default value for the field (can be an empty string) values - Array of predefined values (required for all data types except BARCODE)

Note: The BARCODE data type does not require a values array.

Please check the compatible JSON structure in the file below.

Sample Attribute Set - Modified.json