diff --git a/components/Layers/DesignCode/CardContent/CardContent.tsx b/components/Layers/DesignCode/CardContent/CardContent.tsx
index d1ec86dc..d01d7879 100644
--- a/components/Layers/DesignCode/CardContent/CardContent.tsx
+++ b/components/Layers/DesignCode/CardContent/CardContent.tsx
@@ -1,11 +1,10 @@
-import React from 'react';
-
-import { Section } from 'components/UI/Card/components/Section/Section';
import { Header } from 'components/UI/Card/components/Header/Header';
import { Label } from 'components/UI/Card/components/Label/Label';
+import { Section } from 'components/UI/Card/components/Section/Section';
import { DESIGN_MAP_HOST } from 'components/Layers/DesignCode/designCode';
import styles from 'styles/CardContent.module.css';
+import { Sources } from 'components/UI/Card/components/Sources/Sources';
import { DESIGN_CODE_MARKER_COLOR_BY_TYPE } from '../MapData/MapData.constants';
import { DesignCodeObject } from '../designCodeObject';
@@ -44,6 +43,9 @@ export function DesignCodeCardContent({ placemark }: { placemark?: DesignCodeObj
);
})}
+
) : null;
}
diff --git a/components/Layers/DesignCode/DesignCode.constants.ts b/components/Layers/DesignCode/DesignCode.constants.ts
index 5f3459fb..9dc9a1a4 100644
--- a/components/Layers/DesignCode/DesignCode.constants.ts
+++ b/components/Layers/DesignCode/DesignCode.constants.ts
@@ -13,4 +13,5 @@ export const DESIGN_CODE_ITEMS_COLORS = {
[DesignCodeItemType.TrafficLight]: '#965a14',
[DesignCodeItemType.Transport]: '#006d4e',
[DesignCodeItemType.WallPlate]: '#a00041',
+ [DesignCodeItemType.ColumnsWithArrows]: '#86e621',
};
diff --git a/components/Layers/DesignCode/designCodeObject.ts b/components/Layers/DesignCode/designCodeObject.ts
index 5f75ce6c..f2c0991b 100644
--- a/components/Layers/DesignCode/designCodeObject.ts
+++ b/components/Layers/DesignCode/designCodeObject.ts
@@ -13,6 +13,7 @@ export enum DesignCodeItemType {
CommemorativePlaque = 'Памятные таблички',
Transport = 'Транспорт',
WallPlate = 'Настенные таблички',
+ ColumnsWithArrows = 'Столбы со стрелками',
}
export interface DesignCodeObject {
diff --git a/components/Layers/Filters.config.tsx b/components/Layers/Filters.config.tsx
index dfe9c5df..7675d5fa 100644
--- a/components/Layers/Filters.config.tsx
+++ b/components/Layers/Filters.config.tsx
@@ -26,7 +26,7 @@ export const FILTERS_CONFIG: FilterConfig = {
[FilterType.HouseWearTear]: {
title: 'Степень износа домов',
component: ,
- source: [SOURCES_BY_TYPE.mingkh, SOURCES_BY_TYPE.howoldthishouse],
+ source: [SOURCES_BY_TYPE.mingkh, SOURCES_BY_TYPE.domaekb],
isVerified: false,
},
[FilterType.OKN]: {
diff --git a/components/Layers/Houses/CardContent/CardContent.tsx b/components/Layers/Houses/CardContent/CardContent.tsx
index 8f88600e..9de4f13f 100644
--- a/components/Layers/Houses/CardContent/CardContent.tsx
+++ b/components/Layers/Houses/CardContent/CardContent.tsx
@@ -184,7 +184,7 @@ export function HousesCardContent() {
)}
diff --git a/components/Layers/Quarter/quarter.ts b/components/Layers/Quarter/quarter.ts
index 01411a1e..bf84cacf 100644
--- a/components/Layers/Quarter/quarter.ts
+++ b/components/Layers/Quarter/quarter.ts
@@ -2,9 +2,9 @@ import quarterObjects from 'public/quarter_inspectors.json';
import { QuarterObject } from './quarterObject';
export const quarter = {
- getObject(quarterTitle: string): Promise {
+ getObject(quarterId: string): Promise {
return Promise.resolve(
- quarterObjects.features.find((f) => f.properties.quarterTitle === decodeURI(quarterTitle)).properties as unknown as QuarterObject,
+ quarterObjects.features.find((f) => f.properties.id === quarterId).properties as unknown as QuarterObject,
);
},
};
diff --git a/components/Map/Map.tsx b/components/Map/Map.tsx
index 52ef27fe..6858a42a 100644
--- a/components/Map/Map.tsx
+++ b/components/Map/Map.tsx
@@ -5,6 +5,7 @@ import { useContext } from 'react';
import maplibregl from 'maplibre-gl';
import MapGl from 'react-map-gl';
import { COORDS_EKATERINBURG } from 'constants/coords';
+import { MAX_ZOOM, MIN_ZOOM } from 'constants/map';
import { BuildingSource } from './layers/BuildingSource';
import { DesignCodeSource } from './layers/DesignCodeSource';
@@ -41,8 +42,8 @@ export function Map() {
zoom: 15,
pitch: 0,
}}
- minZoom={11}
- maxZoom={20}
+ minZoom={MIN_ZOOM}
+ maxZoom={MAX_ZOOM}
// hash
style={{ width: '100vw', height: '100vh', color: 'black' }}
mapStyle="https://map-backend.netlify.app/style.json"
diff --git a/components/Map/layers/DtpSource.tsx b/components/Map/layers/DtpSource.tsx
index a88a10df..faa0947d 100644
--- a/components/Map/layers/DtpSource.tsx
+++ b/components/Map/layers/DtpSource.tsx
@@ -1,17 +1,18 @@
import React, { useEffect } from 'react';
import { Source, Layer, useMap } from 'react-map-gl';
-import type { CircleLayer } from 'react-map-gl';
+import type { CircleLayer, HeatmapLayer } from 'react-map-gl';
import { useSelector } from 'react-redux';
import { activeFilterSelector, activeFilterParamsSelector } from 'state/features/selectors';
import { FilterType } from 'types/Filters.types';
import { SEVERITY_CONFIG } from 'components/Layers/DTP/DTP.constants';
import { MapItemType } from 'types/map-item';
-import { getLayerStyle } from 'components/Map/helpers/getFeatureState';
+import { MAX_ZOOM, MIN_ZOOM } from 'constants/map';
import dtp from '../../../public/ekb-dtp.json';
import { usePopup } from '../providers/usePopup';
import useMapObjectState from '../providers/useMapObjectState';
const DTP_LAYER_ID = 'dtp-point';
+const DTP_LAYER_HEATMAP_ID = 'dtp-point-heatmap';
export function DtpSource() {
const ekbMap = useMap();
@@ -66,13 +67,46 @@ export function DtpSource() {
type: 'circle',
source: 'ekb-dtp-source',
paint: {
- 'circle-radius': getLayerStyle({ initial: 8, hover: 10, active: 12 }),
// @ts-ignore
'circle-color': ['case'].concat(...colors).concat(['rgba(0, 0, 0, 0)']),
- // @ts-ignore
'circle-stroke-width': 1,
// @ts-ignore
'circle-stroke-color': ['case'].concat(...strokeColors).concat(['rgba(0, 0, 0, 0)']),
+ 'circle-radius': ['interpolate', ['linear'], ['zoom'], MIN_ZOOM, 1, MAX_ZOOM, 12],
+ },
+ };
+
+ const heatmapStyle: HeatmapLayer = {
+ id: DTP_LAYER_HEATMAP_ID,
+ source: 'ekb-dtp-source',
+ type: 'heatmap',
+ paint: {
+ 'heatmap-weight': {
+ type: 'exponential',
+ property: 'weight',
+ stops: [
+ [0, 0],
+ [1, 1],
+ ],
+ },
+ 'heatmap-intensity': 1,
+ 'heatmap-color': [
+ 'interpolate',
+ ['linear'],
+ ['heatmap-density'],
+ 0,
+ 'rgba(0, 0, 255, 0)',
+ 0.2,
+ 'rgb(0, 255, 0)',
+ 0.4,
+ 'rgb(255, 255, 0)',
+ 0.6,
+ 'rgb(255, 0, 0)',
+ 1,
+ 'rgb(255, 0, 0)',
+ ],
+ 'heatmap-radius': ['interpolate', ['linear'], ['zoom'], MIN_ZOOM, 2, MAX_ZOOM, 50],
+ 'heatmap-opacity': ['interpolate', ['linear'], ['zoom'], MIN_ZOOM, 1, MAX_ZOOM, 0],
},
};
@@ -80,6 +114,7 @@ export function DtpSource() {
<>
>
);
diff --git a/components/Map/layers/QuarterSource.tsx b/components/Map/layers/QuarterSource.tsx
index c4403810..b5ea9402 100644
--- a/components/Map/layers/QuarterSource.tsx
+++ b/components/Map/layers/QuarterSource.tsx
@@ -25,7 +25,7 @@ export function QuarterSource() {
const handlePointClick = (e) => {
const item = e.target.queryRenderedFeatures(e.point)[0];
- openPopup(decodeURI(item?.properties?.quarterTitle), MapItemType.Quarter);
+ openPopup(item?.properties?.id, MapItemType.Quarter);
};
map.on('click', QUARTER_LAYER_ID, handlePointClick);
diff --git a/components/UI/Copyright/Copyright.tsx b/components/UI/Copyright/Copyright.tsx
index c3e9f058..86b12d02 100644
--- a/components/UI/Copyright/Copyright.tsx
+++ b/components/UI/Copyright/Copyright.tsx
@@ -1,7 +1,7 @@
-import React, { useContext } from 'react';
+import { useContext } from 'react';
import { useSelector } from 'react-redux';
-import { activeFilterSelector } from 'state/features/selectors';
import { MapContext } from 'components/Map/providers/MapProvider';
+import { activeFilterSelector } from 'state/features/selectors';
import { FILTERS_CONFIG } from '../../Layers/Filters.config';
import styles from './Copyright.module.css';
diff --git a/components/UI/Filters/components/Filter/Filter.module.css b/components/UI/Filters/components/Filter/Filter.module.css
index ead40dea..6c34a9ea 100644
--- a/components/UI/Filters/components/Filter/Filter.module.css
+++ b/components/UI/Filters/components/Filter/Filter.module.css
@@ -22,7 +22,3 @@
visibility: visible;
max-height: 100vh;
}
-
-.filter_no_paddingTop {
- padding-top: 0;
-}
diff --git a/constants/map.ts b/constants/map.ts
new file mode 100644
index 00000000..41c6957f
--- /dev/null
+++ b/constants/map.ts
@@ -0,0 +1,2 @@
+export const MIN_ZOOM = 11;
+export const MAX_ZOOM = 20;
diff --git a/constants/sources.ts b/constants/sources.ts
index dfbf9e82..5dbb25c3 100644
--- a/constants/sources.ts
+++ b/constants/sources.ts
@@ -1,4 +1,9 @@
export const SOURCES_BY_TYPE = {
+ osm: {
+ name: 'OpenStreetMap',
+ link: 'https://www.openstreetmap.org/',
+ data: null,
+ },
okn: {
name: 'Объекты культурного наследия Свердловской области',
link: 'https://okn.midural.ru/kategorii/obekty-kulturnogo-naslediya-sverdlovskoy-oblasti',
diff --git a/public/deisgn2.gif b/public/deisgn2.gif
new file mode 100644
index 00000000..d61354c7
Binary files /dev/null and b/public/deisgn2.gif differ
diff --git a/public/original-fe8f74380d18930e4e1361be3e93229e.mp4 b/public/original-fe8f74380d18930e4e1361be3e93229e.mp4
new file mode 100644
index 00000000..d61354c7
Binary files /dev/null and b/public/original-fe8f74380d18930e4e1361be3e93229e.mp4 differ