webgis4u
is a javascript client to visualise geographical maps based on OpenLayers.
Use npm/yarn to install webgis4u
as a dependency.
$> npm i webgis4u
or
$> yarn add webgis4u
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 savedtemplates
(options): Path to a folder containing additional templates, that will be used in the template generation process. It looks for.html
files namescopyright
,card_menu
,link_panel
,tool_switcher_functions
,tool_switcher_layers
,info_panel_header
,info_panel_footer
,legend
The API documentation can be found here.
The naming convention is intended to match the one established by OpenLayers. Have a look here.
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 modeproject/ $ yarn link webgis4u
to use your local copy of webgis4u inside your projectproject/ $ yarn start
(or whatever command you use to start the project locally)
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.