Create a Template to display the results
A template is a fragment of HTML with a few custom extensions. Templates are used by Local Knowledge to display results in WebMap. You can create custom templates to display results.
TIP: WebMap 9.1 uses the JavaScript framework vue.js as its frontend library. A Vue component consists of some html and an optional JavaScript object to hold data and logic. All templates in WebMap 9.1 have vue components. For more information see: https://vuejs.org/v2/guide/index.html
Area, NearestN, Statistics and Distance are installed with pre-defined templates. However they can be edited and customised according to user preference (for e.g. error messages or results found messages)
Click Configuration > Local Knowledge > Advanced.
This shows you all the Master Templates used for Local Knowledge- these templates are stored in the SQL Server database and should only be edited if a permanent change is required to all future default Local Knowledge templates.
To create your own templates based on the master templates and customise them, see below.
Example
In this example, you can see how information is routed from the SWD to the website.
- Select Map > Configuration > Local Knowledge.
- The URL of your GeognoSIS instance and the default SWD file path are filled in automatically. You can change them manually if needed. Ensure your new SWD layer has a defined knowledge type.
- Select Template at the bottom of the page. Select the layer from the SWD that you want to add the default template to.
- Click Create to customise your template.
Note: Local Knowledge supports multiple templates and SWDs. This allows different queries to be run from the same web service depending on the map.
This enables the user to create their own Local Knowledge queries as long as they have a layer with a searchable table. Users can easily change the template by either editing an existing example or manually defining the selections.