No description, website, or topics provided.
Clone or download
manuelroth Merge pull request #79 from nzzdev/feat-new-config
added config for UserHasRole availabilityCheck
Latest commit bc1aa9b Dec 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dev-config Merge pull request #70 from nzzdev/fix-schema Jul 12, 2018
helpers Converted geojson list should be assigned to item Aug 15, 2018
resources added config for UserHasRole availabilityCheck Dec 17, 2018
routes implement new configuration format availabilitycheck dynamic-enum Dec 13, 2018
slippyMap Move convertion of longitude coordinates to server side Jul 17, 2018
styles_src Adjustments to style of labels Jul 13, 2018
tasks Dont show minimap in label placement fixture data Jul 13, 2018
test Add subtitle Jul 4, 2018
views Support type line in legend Jul 13, 2018
.dockerignore v 1.6.0 Oct 17, 2017
.editorconfig init Mar 24, 2017
.gitignore Feat fixture data & update dependencies (#50) Jan 31, 2018
.nvmrc (chore) Update node to version 10 and update dependencies Jul 6, 2018
.travis.yml (chore) Update node to version 10 and update dependencies Jul 6, 2018
Dockerfile (chore) Update node to version 10 and update dependencies Jul 6, 2018
LICENSE add MIT license Mar 31, 2017
README.md Update readme Jul 12, 2018
index.html Add sophie-legend to stylesheet link on example page Jul 12, 2018
index.js Replace all string concatenation with template strings Jul 12, 2018
jspm.config.js Feat fixture data & update dependencies (#50) Jan 31, 2018
package-lock.json Update version to 1.10.4 Sep 20, 2018
package.json Update version to 1.10.4 Sep 20, 2018
server-plugins.js Feat fixture data & update dependencies (#50) Jan 31, 2018
server.js Feat fixture data & update dependencies (#50) Jan 31, 2018

README.md

Q Map

Maintainer: manuelroth

Q map is one tool of the Q toolbox to produce simple pointer maps. Test it in the demo: https://q-demo.st.nzz.ch/

Implementation details

The tool structure follows the general structure of each Q tool. Further information can be found in Q server documentation - Developing tools.

LAYER_CONFIGS must be specified as an environment parameter when starting the tool. Please see the test script command in package.json or dev-config/server-config.js for examples on what this environment parameter should look like.

There is a LAYER_CONFIG available matching the layers in use at NZZ if you start with npm run dev.

If you work with Q-cli there is a config file dev-config/server-config.js for starting Q dev server. Add an env.json file in repository root with the following content and adjust mapbox tokens, map ids and target names (here: nzz_ch and nzzas) accordingly:

{
  "mapboxTokens": {
    "nzz_ch": "token 1",
    "nzzas": "token 2"
  },
  "mapIds": {
    "nzz_ch": {
      "standard": {
        "full": "map id",
        "background": "map id",
        "labels": "map id"
      },
      "lessLabels": {
        "full": "map id",
        "background": "map id",
        "labels": "map id"
      },
      "terrain": {
        "full": "map id",
        "background": "map id",
        "labels": "map id"
      },
      "reduced": {
        "full": "map id",
        "background": "map id",
        "labels": "map id"
      }
    },
    "nzzas": {
      "standard": {
        "full": "map id",
        "background": "map id",
        "labels": "map id"
      },
      "lessLabels": {
        "full": "map id",
        "background": "map id",
        "labels": "map id"
      },
      "terrain": {
        "full": "map id",
        "background": "map id",
        "labels": "map id"
      },
      "reduced": {
        "full": "map id",
        "background": "map id",
        "labels": "map id"
      }
    }
  }
}

Of course with another mapbox configuration you have to adjust the LAYER_CONFIGS defintion as well so that it fits your needs.

Installation

$ npm install
$ npm run build

Development

Install the Q cli and start the Q dev server:

$ Q server

Run the Q tool:

$ npm run dev

Implementation details

The tool structure follows the general structure of each Q tool. Further information can be found in Q server documentation - Developing tools.

License

Copyright (c) 2018 Neue Zürcher Zeitung. All rights reserved.

This software is published under the MIT license.