From 0602256cb497a0ab13526a6432e9fdb04796553b Mon Sep 17 00:00:00 2001 From: jlpereira Date: Wed, 12 Mar 2025 19:30:26 -0300 Subject: [PATCH] Add field occurrence point style --- src/assets/css/vars.css | 1 + src/components/Map/icons/FieldOccurrence.js | 5 +++++ src/components/Map/icons/index.js | 1 + src/components/Map/shapes/FieldOccurrence.js | 5 +++++ .../otus/components/Panel/PanelMap/constants/legend.js | 4 ++++ tailwind.config.cjs | 3 ++- 6 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/components/Map/icons/FieldOccurrence.js create mode 100644 src/components/Map/shapes/FieldOccurrence.js diff --git a/src/assets/css/vars.css b/src/assets/css/vars.css index 6afb3eb..c59557f 100644 --- a/src/assets/css/vars.css +++ b/src/assets/css/vars.css @@ -22,6 +22,7 @@ --color-map-asserted: 249, 115, 22; --color-map-type-material: 51, 136, 255; --color-map-collection-object: 239, 68, 68; + --color-map-field-occurrence: 132, 204, 22; --color-scrollbar-thumb: 156, 163, 175; --color-scrollbar-track: 229, 231, 235; diff --git a/src/components/Map/icons/FieldOccurrence.js b/src/components/Map/icons/FieldOccurrence.js new file mode 100644 index 0000000..214d928 --- /dev/null +++ b/src/components/Map/icons/FieldOccurrence.js @@ -0,0 +1,5 @@ +export const FieldOccurrence = { + className: 'bg-map-field-occurrence rounded-full map-point-marker', + iconSize: [8, 8], + iconAnchor: [4, 4] +} diff --git a/src/components/Map/icons/index.js b/src/components/Map/icons/index.js index 2f9fb72..3889f3f 100644 --- a/src/components/Map/icons/index.js +++ b/src/components/Map/icons/index.js @@ -1,4 +1,5 @@ export * from './AssertedDistribution' export * from './CollectionObject' +export * from './FieldOccurrence' export * from './Georeference' export * from './TypeMaterial' diff --git a/src/components/Map/shapes/FieldOccurrence.js b/src/components/Map/shapes/FieldOccurrence.js new file mode 100644 index 0000000..484d4df --- /dev/null +++ b/src/components/Map/shapes/FieldOccurrence.js @@ -0,0 +1,5 @@ +export const CollectionObject = { + color: `rgb(var(--color-map-field-occurrence))`, + weight: 1, + fillOpacity: 'var(--color-map-shape-opacity)' +} diff --git a/src/modules/otus/components/Panel/PanelMap/constants/legend.js b/src/modules/otus/components/Panel/PanelMap/constants/legend.js index 9107aa8..66c3fd5 100644 --- a/src/modules/otus/components/Panel/PanelMap/constants/legend.js +++ b/src/modules/otus/components/Panel/PanelMap/constants/legend.js @@ -18,5 +18,9 @@ export const LEGEND = { TypeMaterial: { label: 'Type material', background: 'bg-map-type-material' + }, + FieldOccurrence: { + label: 'Field occurrence', + background: 'bg-map-field-occurrence' } } diff --git a/tailwind.config.cjs b/tailwind.config.cjs index dd78091..91b40eb 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -41,7 +41,8 @@ module.exports = { aggregate: withOpacity('--color-map-aggregate'), asserted: withOpacity('--color-map-asserted'), 'type-material': withOpacity('--color-map-type-material'), - 'collection-object': withOpacity('--color-map-collection-object') + 'collection-object': withOpacity('--color-map-collection-object'), + 'field-occurrence': withOpacity('--color-map-field-occurrence') }, primary: {