Playground
Playground copied to clipboard
Have the measurement unit depend on the timezone (which is based on the metadata coordinates).
Overview
- Resolves #110
Screenshots
@StanIwan & @vpetersson Here are some screenshots of the weather app (across various locations).
Toronto
Vancouver
Mock data used
Here's a snippet from my mocked screenly.js
:
const getCoordinates = (area) => {
switch (area) {
case 'San Francisco':
return [
'37.7749',
'-122.4194'
]
case 'Manila':
return [
'14.5995',
'120.9842'
]
case 'Dijon':
return [
'47.3220',
'5.0415'
]
case 'New York':
return [
'40.7128',
'-74.0060'
]
case 'Toronto':
return [
'43.6532',
'-79.3832'
]
case 'Vancouver':
return [
'49.2827',
'-123.1207'
]
default:
return []
}
}
const screenly = {
metadata: {
coordinates: getCoordinates('Vancouver'),
hardware: 'Screenly Player Max',
hostname: 'srly-abcdefghijklmno',
location: 'San Francisco, USA',
screen_name: 'Edge App Test',
screenly_version: 'v1.0.0',
tags: [
'All Screens'
]
},
settings: {
disable_analytics: false,
ga_api_key: 'mcd0n4ld5',
sentry_id: 'p4nd4expr355',
// Make sure to obfuscate the OpenWeatherMap API key as well.
openweathermap_api_key: '[redacted]',
}
}