Skip to content

ZoloKiala/terriajs-spatial-query-plugin

Repository files navigation

TerriaJS Spatial Query Plugin

This repo implements a Single Dataset Spatial Query plugin, to support extension of the core tools available within the Digital Twin Victoria.

The plugin uses the experimental terriajs-plugin-api to interface with the TerriaJS library. Plugins are integrated within a TerriaMap based application through the plugins.ts importer.

Suggested plugin development workflow

We currently suggest using yarn workspaces to develop plugins for terriamap. Follow these steps to to setup a yarn workspace for this plugin:

Checkout the plugin into packages folder

git clone https://github.com/terriajs/terriamap
cd terriamap
git checkout plugins # checkout plugins branch (Temporary step until changes merged to main branch)
mkdir -p packages
cd packages
git clone https://github.com/geoplex/terriajs-spatial-query-plugin

Add the plugin package to the yarn workspace settings of your terriamap package.json file.

Edit package.json for terriamap:

  {
  "private": true,
  "workspaces": {
    "packages": [
      "packages/terriajs",
      "packages/cesium",
      "packages/terriajs-server"
      "packages/terriajs-spatial-query-plugin" // <-- plugin added here
    ],

   ...
   
   "dependencies": {
    "pm2": "^3.2.2",
    "terriajs-plugin-api": "0.0.1-alpha.1",
    "terriajs-spatial-query-plugin": "0.1.0", // <-- plugin version changed to match the version in plugin package.json

Build and Watch TerriaMap Changes

cd terriamap
yarn install
# Starts a terriamap build process that watches for file changes
yarn run gulp watch 

Build and Watch Plugin Changes

cd terriamap/packages/terriajs-spatial-query-plugin
# Start a plugin build process that watches for file changes
yarn watch

Other Plugin Scripts

# Build the plugin
yarn build
# Format Code with Prettier
yarn format
# Run Linter
yarn lint
# Run Linter and Automatically Fix Issues
yarn lint-fix
# Run Tests
yarn test

About

No description, website, or topics provided.

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE.md
Unknown
LICENSE.TXT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published