Import a Data source - Part 2

This article is divided in three parts. The first part covers the data import process, taking shapefiles as example. The second part introduces the creation of a Form to enable editing the attributes of a Data source, and the third and final part will cover the configuration of periodic updates of this Data source with a Listener.

Create a Form

Once the importation of a Data source has successfully been completed, you can allow users to update its records through an interactive map. To simplify this complex process, the eVouala Web platform allows you to configure your own dynamic forms. This awesome feature offers various form controls such as text field, drop list, radio button, checkbox and even a date picker.

For this example, we selected the following attributes we want to include to the Dynamic Form: names, minfilno, minfile_id, ntsmaps, status_d, commodit_d, depotype_d and url. Each of these fields has its own characteristics and we will use some of the available controls to build a dynamic form for this example.

If you take a look at the dataset sample, you’ll notice that the status_d field is entered through this following value list: Developed Prospect, Prospect, Showing, Past Producer. As for the commodit_d field, it saves values that are separated by commas. These values come from this selection: Lead, Zinc, Silver, Antimony, Copper, Gold, Limestone, Iron, Magnetite, Molybdenum, Germanium, Uranium, Zirconium, Platinum, Clay, Tungsten.

Finally, the url field is a link that opens the mine’s record on the Ministry’s Web site. The Dynamic Form allows you to create Select, Multiselect and Link controls that enable you to manage these three types of uses. The Dynamic Form could be described as such:

{
  "editable": "true",
  "queryable": "true",
  "fade_when_editing": "false",
  "attributes": [
      {
          "name": "names",
          "label": "Names",
          "type": "textarea",
          "includeineditfeaturelist": "true"        
      },
      {
          "name": "minfilno",
          "label": "Minfile no",
          "type": "text",
          "includeineditfeaturelist": "true"     
      },
      {
          "name": "minfile_id",
          "label": "Minfile ID",
          "type": "text",
          "readonly": "true",
          "includeineditfeaturelist": "true"
      },
      {
          "name": "ntsmaps",
          "label": "NTS Maps",
          "type": "text"
      },
      {
          "name": "status_d",
          "label": "Status",
          "type": "select",
          "choices": [
              {"value": "Developed Prospect","label": "Developed Prospect"},
              {"value": "Prospect","label": "Prospect"},
              {"value": "Showing","label": "Showing"},
              {"value": "Past Producer","label": "Past Producer"}
          ],
          "validators": [
              {"type": "required","message": "Status is required!"}
          ]
      },
      {
          "name": "commodit_d",
          "label": "Commodity",
          "type": "multiselect",
          "choices": [
              {"value": "Lead","label": "Lead"},
              {"value": "Zinc","label": "Zinc"},
              {"value": "Silver","label": "Silver"},
              {"value": "Antimony","label": "Antimony"},
              {"value": "Copper","label": "Copper"},
              {"value": "Gold","label": "Gold"},
              {"value": "Limestone","label": "Limestone"},
              {"value": "Iron","label": "Iron"},
              {"value": "Magnetite","label": "Magnetite"},
              {"value": "Molybdenum","label": "Molybdenum"},
              {"value": "Germanium","label": "Germanium"},
              {"value": "Uranium","label": "Uranium"},
              {"value": "Zirconium","label": "Zirconium"},
              {"value": "Platinum","label": "Platinum"},
              {"value": "Clay","label": "Clay"},
              {"value": "Tungsten","label": "Tungsten"}
          ]
      },
      {
          "name": "url",
          "label": "Link",
          "type": "link"
      }
  ]
}

As the name says, the Dynamic Form is built on the fly and when you click on a geographic entity, the attributes appear as following:

Importation Information

The Select field show all the available values through a drop-down list menu:

Importation Information

Importation Information

NOTE: A red asterisk placed before the field label indicates a mandatory field.

The MultiSelect field include all the domain values in a list. You can select several values that will automatically separated by a comma in the database:

Importation Information

To select several entities on the map, press the CTRL key on your keyboard and draw a box around the entities you want to select. A list of the selected entities will appear in a table and the entry control will appear on the right of your screen.

This way you can edit the attributes of several geographic entities without selecting them every time.

Importation Information

NOTE: The attributes in the list on the left are the ones that had their includeineditfeaturelist": "true" option added to the form configuration.

Tags