You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
2.7 KiB

//kiosk - городские киоски
// mfc - многофункциональные центры предоставления государственных и муниципальных услуг
// library - библиотеки
// dk - дома культуры и клубы
// sport - спортивные объекты
import { CATEGORIES } from "../config";
export const pointColors = {
[CATEGORIES.kiosk]: "#4561ff",
[CATEGORIES.mfc]: "#932301",
[CATEGORIES.library]: "#a51eda",
[CATEGORIES.dk]: "#ff5204",
[CATEGORIES.sport]: "#138c44",
[CATEGORIES.residential]: "#f8e502",
[CATEGORIES.retail]: "#002398",
};
export const pointLayer = {
type: "circle",
layout: {},
paint: {
"circle-color": [
"match",
["get", "category"],
CATEGORIES.kiosk,
pointColors[CATEGORIES.kiosk],
CATEGORIES.mfc,
pointColors[CATEGORIES.mfc],
CATEGORIES.library,
pointColors[CATEGORIES.library],
CATEGORIES.dk,
pointColors[CATEGORIES.dk],
CATEGORIES.sport,
pointColors[CATEGORIES.sport],
CATEGORIES.residential,
pointColors[CATEGORIES.residential],
CATEGORIES.retail,
pointColors[CATEGORIES.retail],
"black",
],
// "circle-color": "#a51eda",
"circle-radius": [
"interpolate",
["linear"],
["get", "prediction_current"],
0,
0,
200,
2,
300,
10,
],
"circle-stroke-width": 0.4,
"circle-stroke-color": "#fff",
"circle-opacity": 0.8,
},
};
export const unmatchPointLayer = {
type: "circle",
layout: {},
paint: {
"circle-color": "#b4b4b4",
"circle-radius": 3,
"circle-stroke-width": 0.4,
"circle-stroke-color": "#fff",
"circle-opacity": 0.8,
},
};
export const gridLayer = {
type: "fill",
layout: {},
paint: {
"fill-opacity": 0.5,
"fill-outline-color": "transparent",
},
};
const regionColor = "#676767";
export const aoLayer = {
id: "ao",
type: "line",
source: "ao",
"source-layer": "public.msk_ao",
layout: {
"line-join": "round",
"line-cap": "round",
},
paint: {
"line-color": regionColor,
"line-width": 1.5,
"line-opacity": 0.8,
},
};
export const rayonLayer = {
id: "rayon",
type: "line",
source: "rayon",
"source-layer": "public.msk_rayoni",
layout: {
"line-join": "round",
"line-cap": "round",
},
paint: {
"line-color": regionColor,
"line-width": 0.5,
"line-opacity": 0.8,
},
};
export const selectedRegionLayer = {
id: "selected-region",
type: "line",
source: "selected-region",
layout: {
"line-join": "round",
"line-cap": "round",
},
paint: {
"line-color": "#47006e",
"line-width": 2,
"line-opacity": 1,
},
};