Skip to content

environment-agency-austria/webgis4u

Repository files navigation

webgis4u

webgis4u is a javascript client to visualise geographical maps based on OpenLayers.

npm GitHub license travis Greenkeeper badge Coverage Status

Usage

Install

Use npm/yarn to install webgis4u as a dependency.

$> npm i webgis4u

or

$> yarn add webgis4u

HTML Templates

To help you get started with the HTML structure for webgis4u, the webgis4u-cli is provided.

$> npm i webgis4u-cli

or

$> yarn add webgis4u-cli

This tool can be used to generate templates for maps by using the command line

$> webgis4u-cli -out <path> [-templates <path>]

Options:

  • out (required): Path where the generated .html files will be saved
  • templates (options): Path to a folder containing additional templates, that will be used in the template generation process. It looks for .html files names copyright, card_menu, link_panel, tool_switcher_functions, tool_switcher_layers, info_panel_header, info_panel_footer, legend

Development

API Documentation

The API documentation can be found here.

Module and Naming Conventions

The naming convention is intended to match the one established by OpenLayers. Have a look here.

Recommended workflow

Link this package in the project where you'll be using it. You can then run yarn start inside this repo and see your changes immediately:

  • webgis4u/ $ yarn link to register this project locally. This is only needed the first time.
  • webgis4u/ $ yarn start to start webpack in watch mode
  • project/ $ yarn link webgis4u to use your local copy of webgis4u inside your project
  • project/ $ yarn start (or whatever command you use to start the project locally)

Contribute

If you are intereseted in contributing be sure to check out the information on how to contribute as it provides useful information on the current project setup.