aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/attributes/usePositionProperties.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-15 15:47:03 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-15 15:47:03 -0700
commit2a7d1a41dc897018a2bf17d3ca9f85cfb66bbb5f (patch)
tree664edf952e35084ec3f8f3be99011d2ac836d1fa /modern/src/common/attributes/usePositionProperties.js
parent3d3b8096392f074baa7178d2a026525503657d50 (diff)
downloadtrackermap-web-2a7d1a41dc897018a2bf17d3ca9f85cfb66bbb5f.tar.gz
trackermap-web-2a7d1a41dc897018a2bf17d3ca9f85cfb66bbb5f.tar.bz2
trackermap-web-2a7d1a41dc897018a2bf17d3ca9f85cfb66bbb5f.zip
Add missing position values
Diffstat (limited to 'modern/src/common/attributes/usePositionProperties.js')
-rw-r--r--modern/src/common/attributes/usePositionProperties.js56
1 files changed, 56 insertions, 0 deletions
diff --git a/modern/src/common/attributes/usePositionProperties.js b/modern/src/common/attributes/usePositionProperties.js
new file mode 100644
index 00000000..a31700d6
--- /dev/null
+++ b/modern/src/common/attributes/usePositionProperties.js
@@ -0,0 +1,56 @@
+import { useMemo } from 'react';
+
+export default (t) => useMemo(() => ({
+ id: {
+ name: t('deviceIdentifier'),
+ type: 'number',
+ },
+ latitude: {
+ name: t('positionLatitude'),
+ type: 'number',
+ },
+ longitude: {
+ name: t('positionLongitude'),
+ type: 'number',
+ },
+ speed: {
+ name: t('positionSpeed'),
+ type: 'number',
+ },
+ course: {
+ name: t('positionCourse'),
+ type: 'number',
+ },
+ altitude: {
+ name: t('positionAltitude'),
+ type: 'number',
+ },
+ accuracy: {
+ name: t('positionAccuracy'),
+ type: 'number',
+ },
+ valid: {
+ name: t('positionValid'),
+ type: 'boolean',
+ },
+ protocol: {
+ name: t('positionProtocol'),
+ type: 'string',
+ },
+ address: {
+ name: t('positionAddress'),
+ type: 'string',
+ },
+ deviceTime: {
+ name: t('positionDeviceTime'),
+ type: 'string',
+ },
+ fixTime: {
+ name: t('positionFixTime'),
+ type: 'string',
+ },
+ serverTime: {
+ name: t('positionServerTime'),
+ type: 'string',
+ },
+}), [t]);