.. contents:: Table of Contents
:depth: 2
|
Description
.. _plugin
The TerriaJS view plugin provide an extensible and highly configurable set of views ready for TerriaJS.
It leverages over JSON schema to facilitate and speedup the configurations editing for each configured type (csv, wms, wmts, etc).
The plugin also presents an embedded overview of the result showing the layer into an Iframe.
Image below: ckanext-terriajs loaded iframe on CKAN.
|
.. image:: docs/img/terriajs_load.png
:class: with-shadow
:width: 600 px
:alt: Loaded view
|
The terriajs view plugin can link existing views and group them into virtual (lazy loaded) groups of configurations.
It also allows you to use jinja2 template to fill in informations into terriajs views cherry picking the title, description and more directly from the dataset or the target resource.
The dynamic approach (lazy-load + jinja2) allows you to create views which are always in synch with the changes made over the metadata and the resource to show.
The plugin is also able to automatically create a configurable sets ove views (you define what you want to have automatically and how).
Out of the box it is already capable to automatically create views over wms, mvt, csv formats.
|
Validation
.. _validation
The plugin is heavily based on a JSON + JSON-SCHEMA approach.
It ships also an ui form generator which is able to drive the user into the creation or modification of a new (or existing) view.
The frontend js library used is json-editor <https://github.com/json-editor/json-editor>__ but there’s also an ACE editor <https://ace.c9.io/>__ and AJV validation <https://ajv.js.org/>__ to simplify quick editing from experienced editors.
Both UI js libraries are configured to provide UI validation based on JSON schema.
|
.. image:: docs/img/terriajs_group_frontend_validation.png
:width: 800 px
:alt: frontend validation
|
At the backend side th