2018-10-25 11:13:35 +02:00
|
|
|
export const VERSION = '0.3';
|
2018-07-27 16:13:16 +02:00
|
|
|
|
2018-08-14 15:33:23 +02:00
|
|
|
export const NORMAL_ICON_SCALE = 0.625;
|
|
|
|
export const LARGE_ICON_SCALE = 1.0;
|
2018-09-13 16:04:01 +02:00
|
|
|
export const ICON_ANCHOR = [0.5, 1.0];
|
2018-10-25 16:50:38 +02:00
|
|
|
|
2018-07-10 15:19:24 +02:00
|
|
|
// Display order of the report types
|
|
|
|
export const REPORT_TYPES_ORDER = ['gcum', 'interrupt', 'obstacle', 'pothole', 'accident', 'misc'];
|
2018-06-27 14:59:45 +02:00
|
|
|
|
2018-08-05 15:47:28 +02:00
|
|
|
export const MIN_DISTANCE_REPORT_DETAILS = 40; // in meters
|
2018-07-12 17:48:26 +02:00
|
|
|
|
2018-08-25 19:12:35 +02:00
|
|
|
export const MOCK_LOCATION = false;
|
2018-08-22 19:34:20 +02:00
|
|
|
export const MOCK_LOCATION_USE_GPX = true;
|
|
|
|
export const MOCK_LOCATION_GPX_PLAYBACK_SPEED = 2.0;
|
2018-07-21 20:00:37 +02:00
|
|
|
export const MOCK_LOCATION_UPDATE_INTERVAL = 5 * 1000; // in milliseconds
|
2018-08-22 19:34:20 +02:00
|
|
|
// Small area in Montrouge
|
|
|
|
export const MOCK_LOCATION_LAT_MIN = 48.81788;
|
|
|
|
export const MOCK_LOCATION_LNG_MIN = 2.31723;
|
|
|
|
export const MOCK_LOCATION_LAT_MAX = 48.81952;
|
|
|
|
export const MOCK_LOCATION_LNG_MAX = 2.32077;
|
|
|
|
// Paris
|
|
|
|
/*
|
|
|
|
export const MOCK_LOCATION_LAT_MIN = 48.854031;
|
|
|
|
export const MOCK_LOCATION_LNG_MIN = 2.281279;
|
|
|
|
export const MOCK_LOCATION_LAT_MAX = 48.886123;
|
|
|
|
export const MOCK_LOCATION_LNG_MAX = 2.392742;
|
|
|
|
*/
|
2018-06-27 11:17:38 +02:00
|
|
|
|
2018-07-21 20:00:37 +02:00
|
|
|
export const UPDATE_REPORTS_DISTANCE_THRESHOLD = 500; // in meters
|
2018-06-27 11:17:38 +02:00
|
|
|
|
2018-09-12 13:51:53 +02:00
|
|
|
// Minimal number of downvotes needed for a report to be masked
|
|
|
|
export const REPORT_DOWNVOTES_THRESHOLD = 1;
|
2018-07-05 22:40:24 +02:00
|
|
|
|
2018-07-21 20:00:37 +02:00
|
|
|
export const EARTH_RADIUS = 6378137; // in meters
|
2018-06-27 14:59:45 +02:00
|
|
|
|
2018-10-15 09:11:41 +02:00
|
|
|
// Keep reports only in a given radius around map center.
|
|
|
|
export const KEEP_REPORTS_METERS_AROUND = 10000; // in meters
|
|
|
|
|
2018-06-27 14:59:45 +02:00
|
|
|
export const DEFAULT_ZOOM = 17;
|
2018-11-07 22:25:31 +01:00
|
|
|
export const MIN_ZOOM = 6;
|
2018-06-27 14:59:45 +02:00
|
|
|
export const MAX_ZOOM = 18;
|
2018-07-17 16:32:34 +02:00
|
|
|
|
2018-11-07 22:25:31 +01:00
|
|
|
export const MAP_CENTER_WITHOUT_GEOLOCATION = [46.589, 2.944];
|
|
|
|
export const MAP_ZOOM_WITHOUT_GEOLOCATION = 6;
|
|
|
|
|
2018-07-21 20:00:37 +02:00
|
|
|
export const ACCURACY_DISPLAY_THRESHOLD = 100; // in meters
|
2018-08-14 15:33:23 +02:00
|
|
|
export const POSITION_MARKER_RADIUS = 10; // in pixels
|
2018-07-21 20:00:37 +02:00
|
|
|
|
2018-07-17 16:32:34 +02:00
|
|
|
let opencyclemapURL = 'https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png';
|
|
|
|
if (process.env.THUNDERFOREST_API_KEY) {
|
|
|
|
opencyclemapURL += `?apikey=${process.env.THUNDERFOREST_API_KEY}`;
|
|
|
|
}
|
|
|
|
export const TILE_SERVERS = {
|
2018-08-14 15:33:23 +02:00
|
|
|
'cartodb-voyager': 'https://{a-c}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}.png',
|
2018-07-17 16:32:34 +02:00
|
|
|
opencyclemap: opencyclemapURL,
|
|
|
|
};
|
|
|
|
export const DEFAULT_TILE_SERVER = 'cartodb-voyager';
|
2018-07-17 23:19:28 +02:00
|
|
|
|
|
|
|
export const GEOCODING_API_ENDPOINT = 'https://api-adresse.data.gouv.fr/search/';
|
2018-07-26 13:55:08 +02:00
|
|
|
|
|
|
|
// Delay in milliseconds between two consecutive calls to the backend API when
|
|
|
|
// doing batch requests
|
|
|
|
export const DELAY_BETWEEN_API_BATCH_REQUESTS = 1000;
|
2018-07-30 23:08:10 +02:00
|
|
|
|
|
|
|
// A vibration sequence for report alarms
|
|
|
|
export const REPORT_ALARM_VIBRATION_SEQUENCE = [500];
|
2018-08-25 18:15:19 +02:00
|
|
|
|
|
|
|
// Email address to send issues to
|
|
|
|
export const CONTACT_EMAIL_ADDRESS = 'phyks+cyclassist@phyks.me';
|