Skip to content

OpenSeaMap/depth_webfrontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synopsis
--------

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


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

The Python build tool 'Waf' is used to build this repository. The
following tools are required:

  * Python2 (http://www.python.org/)
  * Closure-Compiler (https://developers.google.com/closure/compiler/)
    (works with version 20120403; Download: https://code.google.com/p/closure-compiler/downloads/detail?name=compiler-20120430.zip)
  * Handlebars (http://handlebarsjs.com/precompilation.html)
    (works with version 1.0.12)
    > npm install -g handlebars@1.0.12

To build this project execute the following commands:

  > ./waf configure
  > ./waf build_debug && ./waf install_debug

The install command will copy all necessary files into the folder
'./debug'. To test your developments point your favourite web
server to this directory.

Note: waf requires python2. On current systems you may need to use:
  > python2 waf configure
  > python2 waf build_debug && ./waf install_debug
  
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).