An open source web GIS solution based on OpenLayers
For developer info, see CONTRIBUTING.md.
The old Hajk 2 documentation with detailed installation instructions (Swedish only) is now in a separate readme.
Note that Hajk consists of 3 applications: the main 'client' (which is the web map front end), 'admin' (which basically is a frontend for client's configuration files) and 'mapservice' (the backend server application which has a REST API).
- Clone the repository:
git clone https://github.com/hajkmap/Hajk.git
. - The client app is configured by editing
new-client/public/appConfig.json
. Make sure thatmapserviceBase
is a valid URL to a running instance of MapService that is reachable from your computer (see the following steps for how to deploy a working backend). - The client application resides inside
new-client
, so you can do:cd new-client
and thennpm i && npm start
. (Note that if you have not yet configured a working backend inappConfig.json
, you will get an error here – don't worry, we'll fix that soon.) - The admin application is located in
new-admin
. To get it running docd new-admin && npm i && npm start
. - The client and admin are accompanied by a backend (and an optional proxy) written in .NET. Open both projects in Visual Studio (in
mapservice
andutil
if you need a proxy), then Build and Publish. - Deploy to IIS, make sure that everything is running (choose "Browse" from IIS to see the mapservice page that lists available commands - if you see that, you're good to go). Make sure that the URL your mapservice is running on is the same as specified in client's
appConfig.json
. - Now you should have client running on localhost:3000 and admin on localhost:3001. Open a browser window and check them out!
To build admin or client, just do npm run build
instead of npm start
. This will create a subfolder (build
) that you can rename and serve as static files from any web server.
If you plan to develop for Hajk, make sure to read the next section on code standard for the project.