Code Monkey home page Code Monkey logo

printmaps-ui's Introduction

Web UI for Printmaps Service

This project aims to provide an intuitive Web UI for the printmaps service provided by Klaus Tockloth at http://printmaps-osm.de.

Screenshot of Printmaps UI

Installation

Prerequisites

  • Web server (e.g. Apache httpd)
  • A directory configured so that it serves it's content.

For Apache httpd this might be something like, assuming that the folder you want ot use is /opt/printmaps

  Alias "/" "/opt/printmaps"

  <Directory "/opt/printmaps">
    Order allow,deny
    Allow from all
    Require all granted
  </Directory>

  <LocationMatch "^/$">
    <IfModule mod_headers.c>
      FileETag None
      Header unset ETag
      Header unset Pragma
      Header unset Cache-Control
      Header unset Last-Modified
      Header set Pragma "no-cache"
      Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
      Header set Expires "Mon, 10 Apr 1972 00:00:00 GMT"
    </IfModule>
  </LocationMatch>

  RewriteEngine on

  # extract language from Accept-Language header
  RewriteCond %{HTTP:Accept-Language} (de|fr|en)
  RewriteRule .? - [E=LANG:%1,S=1]
  # fallback to english
  RewriteRule .? - [E=LANG:en]

  RewriteCond %{DOCUMENT_ROOT}/%{ENV:LANG}%{REQUEST_URI} -f
  RewriteRule ^ /%{ENV:LANG}%{REQUEST_URI} [L]

  RewriteRule ^/$ /%{ENV:LANG}/index.html

For caddy web server this might be something like, assuming that the folder you want ot use is /opt/printmaps

localhost:80 {
  root * /opt/printmaps
  encode gzip
  file_server
  
  # extract language from Accept-Language header
  @extractlang {
    path /
    header_regexp lang Accept-Language (de|fr|en)
  }
  redir @extractlang http://localhost/{re.lang.1}/index.html
  
  # fallback to english
  @defaultlang {
    path /
  }
  redir @defaultlang http://localhost/en/index.html
}

Installation Procedure

The Printmaps UI can be deployed with the following steps to any web server:

  1. Download the latest runtime version (printmaps-ui-x.x.x.zip) from GitHib Releases
  2. Unpack the archive inside a folder accessible through http or https (e.g. /opt/printmaps as suggested above).
  3. Create a configuration file named conf/config.json by copying the conf/config.sample.json provided.

Development

Prerequisites

Getting Started

  1. Clone repository from GitHub
  2. Create a configuration file named local/config.json by copying the conf/config.sample.json provided.
  3. Run locally with ng serve -o

Normally the Printmaps should now be opened in your web browser.

Change Log

Version 0.0.4

  • Page margins
  • Inclusion of a map scale
  • Overlay with GPX tracks
  • Clone a map project

Version 0.0.3

  • Definition of user defined texts on top of the map
  • Added tooltips for map project states and actions
  • Added German and French translations
  • Defined PNG as standard format for new map projects
  • Fixed action not triggered when not clicking in the center zone of a button
  • Fixed issue when rendering is launched before the project has been saved

Version 0.0.2

  • Fixed production build (code optimisation)
  • Extracted config into a separate modifiable file
  • Added some notes about installation and development

Version 0.0.1

  • Initial alpha version providing simple selection of an area on a map and allowing to render it

License

printmaps-ui's People

Contributors

lweller avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.