Option Summary

Label Type Description
Data Files File upload Upload valid GeoJSON files to automatically create dataset pages
Image Marker Files File upload Upload images to use as marker icons for points in tours
Popup Content Images File upload Upload images to the images folder to easily include in page content and/or feature popup content
Narrative Column Width Number Set the percentage of the page width that should be used for the narrative column (as opposed to the map)
Map Location Toggle Determines whether map is on the right or left of the narrative column
Show Map Location in URL Toggle Determines if map zoom and coordinates are included in the visible page URL
Default Tour Attribution Text Text that will be included in the attribution section for each tour, unless overwritten by that tour's options
Tile Server Set of options Determines the tile server that will be used for each tour, unless overwritten by that tour's options
Basemap Image Files File upload Upload images that can be included as static images overlaying the tile server
Basemap Icons File Upload Upload smaller images to display in the map legend
Basemap Information List Add one list item for each basemap image you want to use
Update Set of options Update a dataset by uploading a file

Tile Server Option Summary

Label Type Description
Select a Tile Server Dropdown/select Choose a preset tile server, or indicate you will use something else
Custom Tile Server URL Text Include the URL to the tile server if you selected "custom" for tile server
Name of Leaflet Provider Tile Server Text Include the name of the tile server (from Leaflet Providers) if you selected "other" for tile server
API Key or Access Token Text Include the API key or access token if required for the chosen tile server (from Leaflet Providers)
ID or Variant Text Include the id or variant desired if relevant for the chosen tile server (from Leaflet Providers)
Tile Server Attribution Text Add text (markdown and HTML accepted) to include in the attribution section for any tour using this tile server (will overwrite default attribution from Leaflet Providers)

Basemap Information Option Summary

Label Type Description
Select Basemap Image Filepicker Choose the basemaep image file this information is for
Basemap Name Text Will be used to reference the basemap in dropdown selectors for tours and views
Legend Description Text Add text (markdown and HTML accepted) to serve as a label in the map legend
Basemap Icon Filepicker Choose the basemap icon to use for this basemap in the map legend
Legend Alternative Text Text Plain text that will be used as alt text for the basemap image/icon in the legend
Basemap Attribution Text Add text (markdown and HTML accepted) to include in the attribution section for any tour using this basemap
Bounds Set of options Set latitude (North and South) and longitude (East and West) in decimal degrees to position the basemap on the map
Maximum Zoom Number Determines the maximum zoom at which this basemap image should be displayed
Minimum Zoom Number Determines the minimum zoom at which this basemap image should be displayed

Update Option Summary

Label Type Description
Confirm Update Toggle If a dataset update is ready, indicates that the update is good and should be performed
File for Update File upload Upload a valid GeoJSON file to use to update an existing dataset page
Dataset to Update Dropdown/select Select the existing dataset page to update
Property from Dataset Dropdown/select Select a property from the existing dataset with unique values that can match features from the dataset to features in the update file
Property from File Text If the associated property from the update file does not have the same name as the property from the dataset, indicate the property's name
Update Type Dropdown/select Choose the type of update (standard or removal)
Modify Existing Features Toggle For standard updates, update coordinates and/or properties for features in the existing dataset that have matches in the update file
Add New Features Toggle For standard updates, add new features from the update file that have no match in the existing dataset
Remove Missing Features Toggle For standard updates, remove any features from the existing dataset that do not have matches in the update file

General Tab Options

Data Files

Upload valid GeoJSON files to automatically turn into new dataset pages. Read Prepare Dataset Files for more information on what files are accepted.

Note: You must modify your site security settings if you want to upload JS files instead of JSON.

  • Label (admin panel): Data Files
  • Label (yaml): data_files
  • Upload: Accepts .js and .json files (limit of 50)
  • File destination: your-grav-install/user/data/leaflet-tour/datasets/uploads/
  • Default: not set

Image Marker Files

Upload valid image files to use as marker icons for point datasets. You can also upload images to use as shadows or for retina displays if you would like.

  • Label (admin panel): Image Marker Files
  • Label (yaml): icon_files
  • Upload: Accepts any image files (limit of 50)
  • File destination: your-grav-install/user/data/leaflet-tour/images/icons/
  • Default: not set

The name is a bit of a misnomer - images uploaded here will go to the image folder, where they can easily be included in the content for any page on the site. This is a particularly good place to upload images you want to include in feature popup content, but it is not your only option.

To reference an image uploaded here (in markdown) use: ![your image alt text here](image://your-image-name-here.jpg)

  • Label (admin panel): Popup Content Images
  • Label (yaml): popup_files
  • Upload: Accepts any image files (limit of 500)
  • File destination: your-grav-install/user/images/
  • Default: not set

Narrative Column Width

The narrative column and map are displayed side by side (assuming the window is large enough). By default, the column will receive 33% of the available width, but you can change that percentage here. Make sure to test how the site looks with various page widths to ensure your chosen percentage works well!

Note: This is the default for each tour, but can be overwritten by specific tours.

  • Label (admin panel): Narrative Column Width
  • Label (yaml): tour_options.column_width
  • Accepted range: Number from 0 to 100, inclusive
  • Default: 33

Map Location

Determine whether the narrative column should be on the right and the map on the left of the page (default) or vice versa.

Note: This is the default for each tour, but can be overwritten by specific tours.

  • Label (admin panel): Map Location
  • Label (yaml): tour_options.map_on_right
  • Options:
    • Left (false) - The map will be on the left side of the page, with the narrative column on the right side
    • Right (true) - The map will be on the right side of the page, with the narrative column on the left side
  • Default: Right (true)

Show Map Location in URL

Determine whether the map's current zoom and center coordinates should be included in the page URL. Note that, due to the way the plugin currently works, sharing a URL with the zoom and coordinates will not actually share the map position with another user.

Note: This is the default for each tour, but can be overwritten by specific tours.

  • Label (admin panel): Show Map Location in URL
  • Label (yaml): tour_options.show_map_location_in_url
  • Options:
    • Disabled (false) - The page URL will not be modified
    • Enabled (true) - The page URL will display the current zoom and center coordinates of the map on the site (and will be modified as the user pans and zooms the map)
  • Default: Disabled (false)

Default Tour Attribution

This text will be included in the attribution section for each tour, unless overwritten by that tour. Plain text, markdown, and HTML are all accepted and will be displayed appropriately.

Note: This is the default for each tour, but can be overwritten by specific tours.

  • Label (admin panel): Default Tour Attribution
  • Label (yaml): tour_options.attribution
  • Default: Map created using Leaflet

Basemaps Tab Options

Select a Tile Server

Select one of a few provided options to use as the default tile server for all tours, select "custom" to provide your own URL for a tile server, or select "other" to specify a different tile server included with Leaflet Providers. Go to the Leaflet Providers GitHub page for additional options and information. Please note that some options require additional information or actions. For example, to use Esri/ArcGIS maps you must register and abide by their terms of service. You are responsible for adhering to any guidelines for tile server usage.

Note: This is the default for each tour, but can be overwritten by specific tours.

  • Label (admin panel): Select a Tile Server
  • Label (yaml): tile_server.select
  • Options:
    • Custom URL (custom) - You will provide a URL for a specified tile server instead of using one from Leaflet Providers
    • Other Leaflet Providers Tile Server (other) - You will provide the name of a tile server from Leaflet Providers not already included in this dropdown, along with any other necessary information for usage (e.g. API key)
    • Various additional options, all of which are from Leaflet Providers
  • Default: OpenTopoMap (OpenTopoMap)

Custom Tile Server URL

If you selected Custom URL (custom) for the tile server, you must provide a valid tile server URL here. Otherwise, the default tile server will be used instead.

  • Label (admin panel): Custom Tile Server URL
  • Label (yaml): tile_server.url
  • Default: not set

Name of Leaflet Provider Tile Server

If you selected Other Leaflet Providers Tile Server (other) for the tile server, you must provide a valid Leaflet Providers name here (e.g. Stamen.Watercolor). Otherwise, the default tile server will be used instead.

  • Label (admin panel): Name of Leaflet Provider Tile Server
  • Label (yaml): tile_server.name
  • Default: not set

API Key or Access Token

If you selected a tile server from Leaflet Providers that requires an API key or access token, you will need to provide that here. None of the options provided directly in the tile server dropdown list should require this, but some of the other options available will require either an API key or an access token.

  • Label (admin panel): API Key / Access Token
  • Label (yaml): tile_server.key
  • Default: not set

ID or Variant

If you selected a tile server from Leaflet Providers that requires an ID or variant specified, you will need to provide that here. None of the options provided directly in the tile server dropdown list should require this, but some of the other options available will require either an ID or a variant to be specified. Also, some tile servers may include this as an option if you would like something other than the default.

  • Label (admin panel): ID or Variant
  • Label (yaml): tile_server.id
  • Default: not set

Tile Server Attribution

If you are using a Leaflet Provider tile server, either one included in the dropdown menu or otherwise, attribution will automatically be provided. While you can overwrite that attribution by providing text here, as a general rule you should not do so and should instead leave this field blank.

If you are using a custom tile server (as specified by a URL), no attribution will be automatically generated, so you should fill this field out with the correct content. Plain text, markdown, and HTML are all accepted and will be displayed appropriately.

  • Label (admin panel): Tile Server Attribution
  • Label (yaml): tile_server.attribution
  • Default: not set (but automatically generated for all Leaflet Provider tile servers)

Basemap Image Files

Upload valid image files to include as static overlays on top of the tile server. Note that you will have to provide valid basemap information and specify that the particular basemap should be included in the configuration for a given tour or view. You will need to save the page before you can provide information associated with an uploaded file. Refer to Add Custom Basemaps for more information.

  • Label (admin panel): Basemap Image Files
  • Label (yaml): basemap_files
  • Upload: Accepts any image files (limit of 50)
  • File destination: your-grav-install/user/data/leaflet-tour/images/basemaps/
  • Default: not set

Basemap Icons

Upload valid image files to use as icons in map legends. You can associate an uploaded icon with a particular basemap image when filling out the basemap information for that image. If no icon is provided, the basemap image itself will be used in the legend. It is advisable to use an icon if possible, as you can provide a lower resolution image that will load faster than the full basemap image would.

Note that basemaps are only included in a map legend for a given tour if the appropriate settings are enabled for that tour.

  • Label (admin panel): Basemap Icons
  • Label (yaml): basemap_icon_files
  • Upload: Accepts any image files (limit of 50)
  • File destination: your-grav-install/user/data/leaflet-tour/images/basemaps/icons/
  • Default: not set

Basemap Information

All basemaps must be added to this list before they can actually be used in tours or views.

Basemap Image

All images uploaded to Basemap Image Files are available (assuming you have saved since then). Select the basemap this information is for. Don't use the same basemap twice, as the conflicting information could cause problems.

  • Label (admin panel): Select Basemap Image
  • Label (yaml): .file
  • Options: All files from your-grav-install/user/data/leaflet-tour/images/basemaps/

Basemap Name

By default, the basemap will be referred to by its file name (when given the option to add basemaps to tours and views). Since no thumbnail image will be visible for tour/view basemap selection, it may be useful to provide a more meaningful name for the basemap, which will then be used instead of the file name.

This name will also be used to refer to the basemap in the legend if no legend description (below) is provided.

  • Label (admin panel): Basemap Name
  • Label (yaml): .name

Legend Description

Set the text to be used whenever the basemap is included in a tour's legend. Plain text, markdown, and HTML are all accepted and will be displayed appropriately.

  • Label (admin panel): Legend Description
  • Label (yaml): .legend

Basemap Icon

Choose a lower resolution image to use whenever the basemap is included in a tour's legend. If no icon is selected, the actual basemap image will be used instead, which may increase site load times.

  • Label (admin panel): Basemap Icon
  • Label (yaml): .icon
  • Options: All files from your-grav-install/user/data/leaflet-tour/images/basemaps/icons/

Legend Alternative Text

Set text to be used as the alternative text for the basemap image/icon included in the legend. Use plain text only. This will only be included in the legend of a given tour, and only if the appropriate options (for both legend and legend basemaps) are enabled.

  • Label (admin panel): Legend Alternative Text
  • Label (yaml): .legend_alt

Basemap Attribution

This text will be included in the attribution section for any tour that includes the basemap (this includes tours that have at least one view that includes the basemap). Plain text, markdown, and HTML are all accepted and will be displayed appropriately.

  • Label (admin panel): Basemap Attribution
  • Label (yaml): .attribution

Bounds

Four fields: Indicate the latitude and longitude values (in decimal degrees) indicating the position of the basemap's image. This will determine where the image is placed on top of the tile server.

  • North (bounds.north) - Decimal number from -90 to 90, inclusive
  • South (bounds.south) - Decimal number from -90 to 90, inclusive
  • East (bounds.east) - Decimal number from -180 to 180, inclusive
  • West (bounds.west) - Decimal number from -180 to 180, inclusive

Maximum Zoom

Define the maximum zoom level at which this basemap can be shown. Zoom values for tile servers may range from 0 to 28 (though some may be more limited). Zooming in closer than the provided value will remove the basemap from the map until the user zooms back out. This value is useful because zooming in too close may cause the image to become quite blurry, depending on its resolution.

  • Label (admin panel): Maximum Zoom
  • Label (yaml): .max_zoom
  • Accepted range: Integer from 0 to 28, inclusive
  • Default: 16

Minimum Zoom

Define the minimum zoom level at which this basemap can be shown. Zoom values for tile servers may range from 0 to 28 (though some may be more limited). Zooming out farther than the provided value will remove the basemap from the map until the user zooms back in. This value is useful because zooming out too far may cause the image to become too small to be useful.

  • Label (admin panel): Minimum Zoom
  • Label (yaml): .min_zoom
  • Accepted range: Integer from 0 to 28, inclusive
  • Default: 8

Update Tab Options

These options are for updating an existing dataset page by uploading a new GeoJSON file. Update Datasets Using File describes this process in more detail.

Update Status

This read-only field is updated each time you save the plugin configuration and indicates the current status of a pending update. If there are issues preventing an update, it will indicate them. If there are no issues and an update is ready, it will indicate what changes the update will cause.

Confirm Update

If the update status message indicates the update is ready, toggling this option on and saving will complete the update. Nothing will happen if you toggle it on when an update is not ready. The toggle will always be reset to Disabled (false) after saving the plugin config.

  • Label (admin panel): Confirm Update
  • Label (yaml): update.confirm
  • Options:
    • Disabled (false)
    • Enabled (true)
  • Default: Disabled (false)

File for Update

Upload a valid GeoJSON file to use in updating the dataset. Refer to Prepare Dataset Files for file requirements.

  • Label (admin panel): File for Update
  • Label (yaml): update.file
  • Upload: Accepts a .js or .json file (limit of 1)
  • File destination: your-grav-install/user/data/leaflet-tour/datasets/update/
  • Default: not set

Dataset to Update

Select an existing dataset page to update. All valid dataset pages will be listed in the dropdown menu.

Note that when using the admin panel, the options will list datasets by name/title, but the actual values stored in the YAML are the dataset ids. You can find the id for any dataset by going to its page and viewing its header in expert mode.

  • Label (admin panel): Dataset to Update
  • Label (yaml): update.dataset
  • Options:
    • None (none)
    • All valid dataset pages (listed by name in admin panel and by id in YAML)
  • Default: None (none)

Property from Dataset

This property must be a valid property for the chosen dataset (the status message will indicate an error if it is not set or valid). The property will be used to determine which features in the existing dataset match features in the update file.

It is recommended to have some property that will serve as a unique identifier, and to choose that property here. Using a property that may have the same value for multiple features is not supported and may lead to strange or unwanted behavior.

Note that when using the admin panel, the options will list all properties by name (grouped under the dataset they are from), but the actual values stored in the YAML are slightly different. The properties are stored as [dataset_id]--prop--[property_name], because multiple datasets may have properties with the same name.

  • Label (admin panel): Property from Dataset
  • Label (yaml): update.dataset_prop
  • Options:
    • None (none)
    • Coordinates (coords)
    • All properties from all datasets (listed by property name in admin panel and by a string combining dataset id and property name in YAML)
  • Default: None (none)

Property from File

If you selected a property from Property from Dataset, but the corresponding property in the update file has a different name, then you will need to enter that name in this field (if you selected "None" or "Coordinates" the field will be ignored). If the property from the update file has the same name, then you can leave the field blank.

It is recommended to have some property that will serve as a unique identifier, and to choose that property in Property from Dataset.

  • Label (admin panel): Property from File
  • Label (yaml): update.file_prop
  • Default: not set

Update Type

There are two possible update types. Standard updates allow you to make changes to existing features, remove features, and/or add features, depending on the other settings you choose (below). Removal updates, on the other hand, will remove all features from the existing dataset that have a match in the update file.

  • Label (admin panel): Update Type
  • Label (yaml): update.type
  • Options:
    • Standard (standard) - Must toggle at least one of the standard options (below) to define what will be updated
    • Removal (removal) - Removes features from existing dataset if they have a match in the update file
  • Default: Standard (standard)

Modify Existing Features

This option only applies for standard updates. It determines whether or not existing features in the dataset can be modified by matching features in the update file.

  • Label (admin panel): Modify Existing Features
  • Label (yaml): update.modify
  • Options:
    • Enabled (true) - Features from the update file will modify their matches in the existing dataset (properties and/or coordinates may change)
    • Disabled (false) - Features in the existing dataset that have matches in the update file will remain unchanged
  • Default: Enabled (true)

Add New Features

This option only applies for standard updates. It determines whether or not new features from the update file (i.e. features that have no matches in the existing dataset) will be added to the dataset.

  • Label (admin panel): Add New Features
  • Label (yaml): update.add
  • Options:
    • Enabled (true) - Any features in the update file without matches will be added to the existing dataset as new features
    • Disabled (false) - Any features in the update file without matches will be ignored
  • Default: Enabled (true)

Remove Missing Features

This option only applies for standard updates. It determines whether or not features from the existing dataset that have no matches in the update file will be removed.

  • Label (admin panel): Remove Missing Features
  • Label (yaml): update.remove
  • Options:
    • Enabled (true) - Features from the existing dataset with no matches will be removed (only features that have matches in the update file will remain)
    • Disabled (false) - Features from the existing dataset with no matches will remain unchanged
  • Default: Disabled (false)

Example YAML

This is how everything looks in YAML. Note that it will be difficult to add an uploaded file by editing the YAML file directly. Also, there are a number of (very important) events that will not be triggered if you edit the file directly, rather than using the admin panel. In general. it is strongly recommended that you edit all options through the Admin Panel to prevent errors.

enabled: true
leaflet_tour: true
data_files: { }
icon_files: { }
popup_files: { }
tour_options:
  column_width: 33
  map_on_right: true
  show_map_location_in_url: false
  attribution: Map created using [Leaflet](https://leafletjs.com/)
tile_server:
  select: OpenTopoMap
  url:
  name:
  key:
  id:
  attribution:
basemap_files: { }
basemap_icon_files: { }
basemap_info:
  -
    file: basemap-image.jpg
    name:
    legend:
    icon:
    legend_alt:
    attribution:
    bounds:
      north: 75
      south: 70
      east: -8
      west: -18
    max_zoom: 16
    min_zoom: 8
update:
  msg: Upload a file, select options, save, and reload the page to begin.
  status: none
  confirm: false
  file:
  dataset: none
  dataset_prop: none
  file_prop:
  type: standard
  modify: true
  add: true
  remove: false