Home

Awesome

The Open Charge Map app (web and mobile)

This app provides the map user interface for browsing data on Open Charge Map (https://map.openchargemap.io). It can also be embedded by other websites using an iframe.

The app is implemented using the Angular version of the Ionic Framework.

Configuration

The build/runtime configuration settings are in /src/environments/environment.ts and environment.prod.ts. The .prod.ts version is used when you build with the --prod flag.

At a minimum the apiBase setting must be set to a working OCM API host and the mapBoxToken must be set to a real mapbox API key.

Feature toggles are defined by the enabledFeatures array, the app will check for the presence of a feature in this array before enabling related UI. This is where additional feature toggles would be defined and this allows dev and prod versions to have different features toggled on.

Build Requirements (Windows/mac OS)

  1. Install Ionic CLI npm install -g @ionic/cli

  2. Install npm modules: npm install (depending on Angular version may require npm install --legacy-peer-deps or npm install --force)

  3. To run in desktop browser: ionic serve

Web production build:

Run ionic build --prod which will output html build to www folder. When updating live app, preserve web.config and favicon. Copy www output to gh-pages branch and commit to publish. When updating live app, preserve CNAME and favicon.

Platform Specifics

Type Docs

typedoc --options typedoc.json --exclude '**/*+(e2e|spec|index).ts' ./src/