Skip to content
forked from hajkmap/Hajk

A modern, full-featured OpenLayers based map viewer and editor

License

Notifications You must be signed in to change notification settings

jesade-vbg/Hajk

 
 

Repository files navigation

Docker Status Netlify Status

Hajk

A full-fledged open source web GIS solution based on OpenLayers

alt text

For developer info, see CONTRIBUTING.md.

New to Hajk and not a developer?

If you are a new user of Hajk, please visit our welcome page (Swedish only) for more information about Hajk.

Looking for support?

You can easily reach out to our community using the Discussions on GitHub.

Live examples

The official automatic build of the latest version can be found here: https://hajk-demo.netlify.app/.

For some real-life examples, see the following solutions:

Quick start (for admins)

Please refer to Hajk's official installation guide.

Quick start (for developers)

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 repo

Clone the repository: git clone https://github.com/hajkmap/Hajk.git.

Get the Backend up and running

Note: There are currently two available backends for Hajk - you need to pick only one:

  • NodeJS backend - a new, recently release backend. Rewritten from scratch in JS. Can be deployed on any platform supported by NodeJS.
  • NET-backend - the original backend, requires Windows and IIS.

If unsure on which backend to pick, it is recommended to choose the NodeJS solution. It is easier to setup because it only requires NodeJS (which you already have if you want to run Hajk anyway).

Alternative 1: NodeJS backend

  1. In hajk repo dir, go to new-backend and install dependencies:
cd new-backend
npm install
  1. Review the settings in .env. It's fine to leave the defaults. Note which PORT is specified, by default it is 3002.
  2. Start the backend in development mode:
npm run dev
  1. Verify that the server is up and running by navigating to http://localhost:3002. There's also a nice API explorer available on http://localhost:3002/api-explorer/.

Alternative 2: .NET backend

  1. Make sure that you have Visual Studio and IIS installed.
  2. Open the SLN-files in backend/
  3. Build and publish.
  4. 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).

Alternative 3: NodeJS backend using Docker

See Docker README for more information.

Launch the Client app

Now when Backend is up and running, it's time to start the Client (and optionally Admin) applications.

  1. You must tell the Client app the location of a running Backend. The configuration is made by editing new-client/public/appConfig.json. Make sure that mapserviceBase is a valid URL to a running instance of the Backend (if you're using the NodeJS application and your Backend is running on port 3002, you should set mapserviceBase to "http://localhost:3002/api/v1".
  2. The client application resides inside new-client. Go there (cd new-client) and install the dependencies and start by typing: npm i && npm start.
  3. Verify that Client is running on http://localhost:3000.

Launch the (optional) Admin app

This process is similar to the Client app.

  1. Set the correct URL to Backend by editing new-admin/public/config.json.
    Map operations have moved to mapconfig so "url_map", "url_map_list", "url_map_create", "url_map_delete" needs to point toward "http://localhost:3002/api/v1/mapconfig...", the rest is the same as for new-client
  2. The admin application is located in new-admin. To get it running do cd new-admin && npm i && npm start.
  3. Verify that Admin is running on http://localhost:3001.

Deploying

You can use the NodeJS backend to deploy the Client and Admin applications as well. For details, see this section in Backend's README.

Contributing

If you plan to develop for Hajk, make sure to read the next section on code standard for the project.

About

A modern, full-featured OpenLayers based map viewer and editor

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.2%
  • C# 2.7%
  • CSS 1.9%
  • Shell 0.1%
  • HTML 0.1%
  • Dockerfile 0.0%