Coder Social home page Coder Social logo

mr1dsgn / erdapfel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qwant/erdapfel

0.0 1.0 0.0 7.59 MB

Qwant Maps front-end

Home Page: https://www.qwant.com/maps/

License: Apache License 2.0

Shell 0.21% JavaScript 73.43% HTML 3.34% CSS 22.68% Dockerfile 0.35%

erdapfel's Introduction

Erdapfel

Erdapfel is Qwant Maps front end application. It is a javascript single page app that allows to browse the map, search for places, see your position on the map, etc

Qwant Maps screenshot

For a global overview of Qwant Maps and more details about each component, check out QwantMaps repo.

Run

Configuration

As Qwant Maps front end app, Erdapfel relies on a bunch of other services and needs some config to define how to interact with these components.

A default config file is provided here. You will need to update it to set some services url, for instance:

  • the tile server: to display the map
  • the geocoder: to search for places
  • the place API: to display some details about the places
  • the storage app: to store your favorite places

The configuration can be overriden by environment variables. The nesting is handle by the separator _ and it must be prefixed by TILEVIEW_

For instance:

system:
  timeout: 5

is overriden by TILEVIEW_system_timeout=3

Run from sources

You will need

  • npm >= 6
  • node >= 8

Then you can build and run Erdapfel with the following commands:

> npm install
> npm run build
# to build in development mode:
> npm run build -- --mode=development
> npm start

Run with docker

Pull the docker image from qwantresearch/erdapfel Docker Pulls , set up your config and voilà !

Develop

Travis Build

Local node TLS errors (only for development and debug, NOT production!!!)

Some requests to node server could trigger this message on node server logs:

"msg":"unable to get local issuer certificate"

You can overpass this error by setting NODE_TLS_REJECT_UNAUTHORIZED=0 on the server environment such as:

> NODE_TLS_REJECT_UNAUTHORIZED=0 npm run start

Note that you are NEVER supposed to use this option for anything else than development.

A note about webfont

The icon font comes from icomoon, the icomoon project is kept in dev/erdapfel_iconmoon.json file. You can open it by drag and drop this file on the icomoon web page.

Test

run TEST=true npm run build then npm run test to launch all tests.

Unit tests

Run unit tests only with npm run unit-test

Integration tests

Run integration tests only with npm run integration-test

It will run chrome headless test suite with a mapbox-gl minimalist mock. The config override is done in the server_start file.

note on mapbox-gl mock: We include out mapbox-gl mock fork to emulate mapbox-gl behaviour with the advanced support of mocked event & poi.

hint : When you debug or add new tests, you may want to launch puppeteer in non headless mode and keep the browser open by setting the environment variable headless to false.

Benchmark

npm run bench will build a production bundle and return size and js execution time metrics to compare evolution of application performance along the project life time.

EntryPoints

Style

/style.json gives access to prebuilt style with (optional) language.

A small script is used behind the scene to build the style of the map and to ease the usage of the icons for the front end. The fonts used for the text displayed on the map are also built using an OpenMapTiles script.

Parameters:

method name value optional default
get lang en, gb ... true en

License

GitHub license

This project is licensed under the Apache License 2.0.

Please not that it depends on many other opensource projects that have their own terms and conditions.

erdapfel's People

Contributors

amatissart avatar sujeebant avatar nlehuby avatar xem avatar guillaumegomez avatar bbecquet avatar hexablob avatar mimir-bot avatar g-ray avatar patfrat avatar jbgriesner avatar antoine-de avatar mlnor27 avatar spasfonx avatar leventdem avatar ziryabf avatar

Watchers

James Cloos 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.