visualize recent sensor data on a world map for Sensor.Community.
👉 Live Version.
The implementation makes use of various frameworks and is on ECMA 6 language level.
Used frameworks are:
Requirements:
- Node JS 10.15.x or higher
- NPM should be version 6.9.x or higher
install all dependencies
cp src/js/config.js.dist src/js/config.js
npm install
start development server (http://127.0.0.1:8080/)
npm start
build all files needed to run on a webserver, files will be compiled into dist/
):
npm run build
npm run ghpages
The translation file can be found in src/js/translation.js
.
To add a new translated word or sentence, add below the key (see below) a new key-value pair. The nested key should start with the iso-code of the language followed by the translated world. You can find the iso-code on wikipedia table (639-1).
"(Sensor)": { // key - original english translation
"de": "Sensor", // nested key - value pair
"fr": "Détecteur" // add new translation "iso-code": "translated word"
},
"PM10 µg/m³": {},
"PM2.5 µg/m³": {},
"AQI US": {},
"Temperature °C": { // key - original english translation
"de": "Temperatur °C",
"fr": "Température °C" // add new translation "iso-code": "translated word"
},...
⚠ Don't forget to add the comma in the previous key - value pair else syntax is broken.
If you don't have a Github account download the file src/js/translation.js
via the Raw
button directly right
over the source code. Send us your file with the translation to "tech (at) sensor.community".
valid sensor parameters PM25, PM10, Pressure, Noise, Humidity & Official_AQI_US http://127.0.0.1:8080/?sensor=Noise
valid parameters zoom level, lat and long http://127.0.0.1:8080/#9/48.8123/9.2487
first start with sensor then location http://127.0.0.1:8080/?sensor=Noise#9/48.8123/9.2487