Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

Commit

Permalink
fix wrong coordinates and split it into a lat/lng object instead (#558)
Browse files Browse the repository at this point in the history
  • Loading branch information
fossecode authored Apr 6, 2020
1 parent 4b17fb3 commit b565847
Show file tree
Hide file tree
Showing 36 changed files with 144 additions and 48 deletions.
3 changes: 0 additions & 3 deletions app/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ if (process.env.DB_PATH) {
if (process.env.LOCALE) {
configOverrides.LOCALE = process.env.LOCALE as Locale;
}
if (process.env.MAP_CENTER) {
configOverrides.MAP_CENTER = process.env.MAP_CENTER;
}
if (process.env.MAP_MAX_ZOOM) {
configOverrides.MAP_ZOOM = parseInt(process.env.MAP_MAX_ZOOM, 10);
}
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/ar/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'ar',
DB_PATH: './covid_db',
LOCALE: 'es-AR',
MAP_CENTER: '-40.28, -67.77', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: -35.43,
lon: -63.77
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 3,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/au/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'au',
DB_PATH: './covid_db',
LOCALE: 'en-AU',
MAP_CENTER: '133.77, -25.27', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: -25.27,
lon: 133.77
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/bd/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'bd',
DB_PATH: './covid_db',
LOCALE: 'bd',
MAP_CENTER: '90.132953, 23.993410', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 23.98,
lon: 90.01
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 4,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/br/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'br',
DB_PATH: './covid_db',
LOCALE: 'pt-BR',
MAP_CENTER: '-47.05, -15.47', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: -15.47,
lon: -47.05
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/ca/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'ca',
DB_PATH: './covid_db',
LOCALE: 'en-CA',
MAP_CENTER: '-95.9, 60.49', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 60.49,
lon: -95.9
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 3,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/cl/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'cl',
DB_PATH: './covid_db',
LOCALE: 'es-CL',
MAP_CENTER: '-33.4706, -70.6368', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: -33.47,
lon: -70.64
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 3,
Expand Down
7 changes: 5 additions & 2 deletions app/countrySpecific/co/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'co',
DB_PATH: './covid_db',
LOCALE: 'es-CO',
MAP_CENTER: '5.046, -73.575', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 5.05,
lon: -73.57
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 3,
RATE_LIMIT_COUNT: 20, // Maximum number of submissions per IP
RATE_LIMIT_WINDOW: 86400000, // Time window in milliseconds for rate limiting
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/cz/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'cz',
DB_PATH: './covid_db',
LOCALE: 'cs-CZ',
MAP_CENTER: '15.4749126, 49.8037633', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 49.8,
lon: 15.47
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 7,
PASSCODE_LENGTH: 3,
Expand Down
9 changes: 6 additions & 3 deletions app/countrySpecific/de/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ export const countrySpecificConfig: Config = {
BASE_URL: 'coronastatus.de',
COUNTRY_CODE: 'de',
DB_PATH: './covid_db',
LOCALE: 'de',
MAP_CENTER: '10.517304, 51.117540', // NB! Lat/lng is opposite of what you find on Google Maps
LOCALE: 'de-DE',
MAP_CENTER: {
lat: 51.12,
lon: 10.52
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 4,
RATE_LIMIT_COUNT: 20, // Maximum number of submissions per IP
RATE_LIMIT_WINDOW: 86400000, // Time window in milliseconds for rate limiting
REDIRECT_TO_GOVERNMENT: false,
SUPPORTED_LOCALES: ['de'],
SUPPORTED_LOCALES: ['de-DE'],
THOUSAND_SEPARATOR: '.',
ZIP_GUIDE: false,
ZIP_PATTERN: '[0-9]{5}',
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/dk/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'dk',
DB_PATH: './covid_db',
LOCALE: 'dk',
MAP_CENTER: '10.399100, 55.463329', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 55.46,
lon: 10.4
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/en/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'en',
DB_PATH: './covid_db',
LOCALE: 'en',
MAP_CENTER: '51.505485, -0.111218', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 51.51,
lon: -0.11
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 4,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/es/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'es',
DB_PATH: './covid_db',
LOCALE: 'es-ES',
MAP_CENTER: '-8.2011537, 40.1217673', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 40.12,
lon: -8.2
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 4,
Expand Down
7 changes: 5 additions & 2 deletions app/countrySpecific/fr/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'fr',
DB_PATH: './covid_db',
LOCALE: 'fr-FR',
MAP_CENTER: '2.5582, 48.9236', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 48.92,
lon: 2.56
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 3,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 4,
RATE_LIMIT_COUNT: 20, // Maximum number of submissions per IP
RATE_LIMIT_WINDOW: 86400000, // Time window in milliseconds for rate limiting
Expand Down
7 changes: 5 additions & 2 deletions app/countrySpecific/id/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'id',
DB_PATH: './covid_db',
LOCALE: 'id-ID',
MAP_CENTER: '106.845, -6.214', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: -3.9,
lon: 119.83
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 5,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 4,
RATE_LIMIT_COUNT: 20, // Maximum number of submissions per IP
RATE_LIMIT_WINDOW: 86400000, // Time window in milliseconds for rate limiting
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/in/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'in',
DB_PATH: './covid_db',
LOCALE: 'en-IN',
MAP_CENTER: '73.706197, 20.7699369', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 20.77,
lon: 73.71
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 4,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/it/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'it',
DB_PATH: './covid_db',
LOCALE: 'it',
MAP_CENTER: '8.2126042, 41.2114557', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 42.75,
lon: 11.45
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 4,
Expand Down
7 changes: 5 additions & 2 deletions app/countrySpecific/lt/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'lt',
DB_PATH: './covid_db',
LOCALE: 'lt',
MAP_CENTER: '55.1735998, 23.8948016', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 55.17,
lon: 23.89
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 3,
RATE_LIMIT_COUNT: 20, // Maximum number of submissions per IP
RATE_LIMIT_WINDOW: 86400000, // Time window in milliseconds for rate limiting
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/mt/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'mt',
DB_PATH: './covid_db',
LOCALE: 'en-MT',
MAP_CENTER: '14.3582, 35.9401', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 35.94,
lon: 14.36
},
MAP_MAX_ZOOM: 14,
MAP_ZOOM: 10,
PASSCODE_LENGTH: 3,
Expand Down
7 changes: 5 additions & 2 deletions app/countrySpecific/mx/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'mx',
DB_PATH: './covid_db',
LOCALE: 'es-MX',
MAP_CENTER: '-100.479, 27.0781', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 27.08,
lon: -100.48
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 5,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 4,
RATE_LIMIT_COUNT: 20, // Maximum number of submissions per IP
RATE_LIMIT_WINDOW: 86400000, // Time window in milliseconds for rate limiting
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/my/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'my',
DB_PATH: './covid_db',
LOCALE: 'ms-MY',
MAP_CENTER: '101.9757, 4.2104', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 4.21,
lon: 101.98
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/ng/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'ng',
DB_PATH: './covid_db',
LOCALE: 'en-NG',
MAP_CENTER: '9.077751, 8.6774567', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 8.68,
lon: 9.08
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 6,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/nl/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'nl',
DB_PATH: './covid_db',
LOCALE: 'nl',
MAP_CENTER: '5.2793, 52.2129', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 52.21,
lon: 5.28
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 7,
PASSCODE_LENGTH: 4,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/no/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'no',
DB_PATH: './covid_db',
LOCALE: 'no',
MAP_CENTER: '10.7522, 63.9139', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 63.91,
lon: 10.75
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/np/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'np',
DB_PATH: './covid_db',
LOCALE: 'ne',
MAP_CENTER: '85.2911132, 27.7090319', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 27.71,
lon: 85.29
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 4,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/ph/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'ph',
DB_PATH: './covid_db',
LOCALE: 'en-PH',
MAP_CENTER: '121.7740173, 12.8797207', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 12.88,
lon: 121.77
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 4,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/pt/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'pt',
DB_PATH: './covid_db',
LOCALE: 'pt-PT',
MAP_CENTER: '-27.8092509,36.8819358', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 38.78,
lon: -9.41
},
MAP_MAX_ZOOM: 10,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 3,
Expand Down
7 changes: 5 additions & 2 deletions app/countrySpecific/ro/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'ro',
DB_PATH: './covid_db',
LOCALE: 'ro-RO',
MAP_CENTER: '22.7775903,45.9199635', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 45.92,
lon: 22.78
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 6,
MAP_ZOOM: 5,
PASSCODE_LENGTH: 3,
RATE_LIMIT_COUNT: 20, // Maximum number of submissions per IP
RATE_LIMIT_WINDOW: 86400000, // Time window in milliseconds for rate limiting
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/se/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'se',
DB_PATH: './covid_db',
LOCALE: 'se',
MAP_CENTER: '16.177382, 62.421176', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 62.42,
lon: 16.18
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 3,
Expand Down
5 changes: 4 additions & 1 deletion app/countrySpecific/sg/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ export const countrySpecificConfig: Config = {
COUNTRY_CODE: 'sg',
DB_PATH: './covid_db',
LOCALE: 'en-SG',
MAP_CENTER: '103.8198, 1.3520', // NB! Lat/lng is opposite of what you find on Google Maps
MAP_CENTER: {
lat: 1.35,
lon: 103.82
},
MAP_MAX_ZOOM: 13,
MAP_ZOOM: 4,
PASSCODE_LENGTH: 4,
Expand Down
Loading

0 comments on commit b565847

Please sign in to comment.