A CRM web application for forestry management under the Hyakumori Project.
- yarn >= 1.22.5
- Copy
.env.example
to.env
and fill necessary variables.
cp .env.example .env
- Copy
mapconfig.example.json
tomapconfig.json
and fill necessary variables. See below for details about the map configuration.
cp .env.example .env
- Install yarn dependencies.
yarn install
Compile the app and launch with hot-reload for development with:
yarn serve
Or build for production with:
yarn build
Linting:
yarn lint
Map configurations are set in the mapconfig.json
file. The current settings are configurable:
tilesources
:- An array of tile source to be used as base maps in the map.
- Required with at least one tile source.
- Each element in the array must be an object with the following properties:
type
: (required) used to build the layer type. Must be one of"xyz"
,"osm"
, or"tilewms"
.name
: (required) the name of the layer. Used for labeling.id
: (required) unique identifier.url
: (required fortilewms
andxyz
type) defines the source of the map tile.attributions
: (required forxyz
type) defines the attribution of the tile.projection
: (required fortilewms
type) defines the projection of the wms layer.
- e.g.:
[{ "type": "osm", "name": "OSM", "id": "osm" }, { "type": "xyz", "name": "標準地図", "id": "std", "url": "https://maps.gsi.go.jp/xyz/std/{z}/{x}/{y}.png?_=20201001a", "attributions": "<a href=\"https://maps.gsi.go.jp/development/ichiran.html\"> 国土地理院 </a>" }, { "type": "tilewms", "name": "赤色立体図", "id": "red", "url": "http://localhost:8000/geoserver/raster/wms", "layer": "raster:赤色立体図データ", "projection": "EPSG:4326" }]
cadastral
:- An object defining the source of the WMS layer for the cadastral data.
- Required (source must be a WMS layer).
- Properties must include:
id
: (required) Unique identifier for the layer. Must not betableLayer
(reserved for an internal layer).name
: (required) the name of the layer. Used for labeling.url
: (required) URL to the wms layer source.layer
: (required) WMS layer name.projection
: (required) WMS layer projection.
- e.g.:
{ "id": "wmsLayer", "name": "全ての地番", "url": "http://localhost:8000/geoserver/crm/wms", "layer": "crm:Forests", "projection": "EPSG:4326" }
center
:- The map center.
- Required. Must be a string specifying longitude and latitude separated by a space.
- e.g.
"134.33234254149718 35.2107812998969"
zoom
:- The map zoom.
- Required. Must be a number surrounded by quotation marks.
- e.g.
"11"
Note, if map layers are being served by the Hyakumori API (over proxy), then it is important
that the URL matches backend env variables defined in the .env
file.
The Hyakumori Project appreciates any contributions.
The Hyakumori CRM was developed by the Hyakumori Team with additional contributions from:
This program is free software. See LICENSE for more information.