Skip to content

OpenSeaMap/depth_webfrontend

Repository files navigation

Synopsis
--------

Web frontend for the depth project (http://depth.openseamap.org).


Installation
------------

The preferred way to build this project is now by using docker compose.

To make sure that docker uses the right permissions, first grab your user ID
and default group ID by doing ```id```. Then create a .env file containing
two lines setting your user id and group id.

```
UID=1000
GID=1000
```

(or something that matches your uid and gid)

Then, in this directory, execute

```
docker-compose build depth-builder && docker-compose run --rm depth-builder
```

or, if you have only docker and not docker-compose

```
docker build -t depth-builder .
docker run --rm -v .:/depth:rw -v ./build:/release:rw --user=<your user id> depth-builder
```

to build an image and then run the build process inside it.
The results will be left in the build/release subdirectory.

Debugging
-----------------------
In order to facilitate debugging, functionality has been added that makes the whole thing work 
without handlebars precompiler or closure compiler. Just load index_local from the file system 
with your browser and that's it. So far has been only tested with chrome.

In order to allow cross site requests without having the server send appropriate headers,
chrome needs to be startet with disabled security. On windows do:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir="C:\Projekte\Osm\ChromeProfile" C:\Projekte\Osm\WebFrontend\depth_webfrontend\src\local_index.html

(of course you have to adjust the paths to user-data-dir and local_index.html accordingly.)

user-data-dir is used to do browsing with disabled security with a special profile that does not contain any personal data.

Furthermore, this works only with the test version of the depth api on testdepth.openseamap.org. 
Please set "apiUrl" in js/oseam.js accordingly
Please DO NOT push your versione of oseam.js with the changed apiUrl to the repository, as this will break automatic deployment


Tests
-----

Actually, we have no tests for the frontend. Feel free to create
some (e.g. Selenium).


Contributors
------------

Bug reports and pull requests are very welcome. Join us on the mailing
list: https://lists.sourceforge.net/lists/listinfo/openseamap-develop


License
-------

This work is released under the 'CC0 License' (see LICENSE file). Some
parts (e.g. third party libraries) are licensed under a different
license (see LICENSE_EXCEPTIONS).

Releases

No releases published

Packages

No packages published