There are two methods for creating new dataset pages - you can either upload files to the plugin configuration to have pages created automatically, or you can manually create pages and add the data yourself.

File Upload

You will need a valid GeoJSON file, as described in Prepare Dataset Files.

The process:

  1. Prepare your GeoJSON file.
  2. Go the plugin configuration and upload the file to the Data Files field.
  3. Save.
  4. Go to the Pages tab, open the datasets page/folder, and look for your dataset.
  5. Open the dataset page and verify that everything looks the way it should.

Automatic Page Creation

Here are how the various properties in the GeoJSON file will be used to create and popuplate your new dataset page.

  • The feature type of the uploaded dataset will be determined by the first valid feature detected (with valid geometry type and coordinates). After that, all features in the file must have the same type to be considered valid.
  • Any invalid features will be completely ignored.
  • The name of the uploaded file (minus the .json or .js extension) will be used to create the dataset's id (mostly internal to the plugin, but you might see it occasionally).
  • If "name" is set for the JSON object, the page title/dataset name will be set to this value. Otherwise the dataset's id will be used.
  • Any feature properties (in the "properties" list) will be added to that feature as properties.
  • The names of all properties from all valid features will be combined to form a list of properties in the dataset.
  • The default "name property" (for determining default feature names) will be automatically selected from the generated listed of dataset properties. In order of preference (note that none of these are case-sensitive):
    • A property called "name"
    • The first property beginning or ending with "name"
    • The first property (if there is at least one property)
  • Assuming the dataset has at least one valid feature, a new page will be added to the pages/datasets/ folder (the datasets folder will be created if it does not exist). The name of the page's folder will be determined by the dataset name.
  • The dataset's upload_file_path property will be set, pointing to the uploaded GeoJSON file's location. This will not be visible in normal mode, but if you ever delete the dataset it will ensure that the now-obsolete uploaded file is removed when the plugin configuration is next saved. (You can also remove the file earlier if you like - it is not being used for anything).

You do not need to worry about a new dataset overwriting an existing one. If the generated dataset id or page route is identical to an existing dataset's, then the id/route will be modified until it is unique. Example: A dataset exists at pages/datasets/some-points. A new dataset is uploaded, and the determined route is the same. The new dataset will instead be placed at pages/datasets/some-points-1.

Manual Page Creation

A new page is automatically created in the pages/datasets/ folder when you upload a new dataset file via the plugin configuration. However, you also have the option to create a dataset page directly.

If you do not already have a "datasets" folder, you may want to start by creating that as a place to keep all of your datasets. As an added bonus, if you later create a page by uploading a file, the automatically created dataset will be in the same place as your other datasets. However, it is not required to place datasets in any particular location for them to be valid, so you do not have to do this if you do not want to.

To create a "datasets" folder:

  1. Go to the Pages tab.
  2. Open the dropdown next to the Add button and choose Add Folder.
  3. Name the folder datasets.
  4. Continue and save.

To create a new dataset page:

  1. Go to the Pages tab or to the datasets folder.
  2. Click Add.
  3. Choose the appropriate parent page/folder if it is not already selected.
  4. Choose "Point Dataset" for the template if the features will be points, "Shape Dataset" otherwise (for lines or polygons).

Note that you do not need to worry about the dataset page showing up in the site navigation or the site map. Dataset pages are automatically set to be non-routable and non-visible. If you are creating a datasets folder following the instructions above (choosing Add Folder instead of just Add or Add Page), then the folder should also be hidden by default.

Of course, the new dataset page would be rather meaningless without any features. Click the Add New Feature button on the Features tab to add a new feature: Make sure to provide valid coordinates or the new feature will not be saved! You can also add properties to features by adding items to the Feature Properties list. Feature properties will be updated to match this list after the page is saved. You can find more information on adding features and properties in the Update Dataset Pages guide.