Skip to content

Commit eeaf2f0

Browse files
committed
feat: add map place type filters
1 parent 14c88cb commit eeaf2f0

2 files changed

Lines changed: 330 additions & 38 deletions

File tree

src/components/map/MapContainer.css

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
overflow: hidden;
66
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
77
border: 1px solid #e2e8f0;
8+
position: relative;
9+
background: #f8fafc;
10+
}
11+
12+
.map-leaflet {
13+
width: 100%;
14+
height: 100%;
815
}
916

1017
.map-loading {
@@ -19,6 +26,103 @@
1926
font-size: 1.25rem;
2027
}
2128

29+
.map-type-filters {
30+
position: absolute;
31+
top: 12px;
32+
left: 12px;
33+
right: 12px;
34+
z-index: 4;
35+
pointer-events: none;
36+
}
37+
38+
.map-type-filter-scroll {
39+
display: flex;
40+
gap: 6px;
41+
max-width: 100%;
42+
overflow-x: auto;
43+
padding: 2px;
44+
scrollbar-width: none;
45+
pointer-events: auto;
46+
}
47+
48+
.map-type-filter-scroll::-webkit-scrollbar {
49+
display: none;
50+
}
51+
52+
.map-type-filter {
53+
display: inline-flex;
54+
align-items: center;
55+
gap: 5px;
56+
min-height: 32px;
57+
padding: 6px 9px;
58+
border: 1px solid rgba(203, 213, 225, 0.95);
59+
border-radius: 999px;
60+
background: rgba(255, 255, 255, 0.94);
61+
color: #334155;
62+
font-size: 12px;
63+
font-weight: 700;
64+
line-height: 1;
65+
white-space: nowrap;
66+
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
67+
backdrop-filter: blur(8px);
68+
cursor: pointer;
69+
transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
70+
}
71+
72+
.map-type-filter:hover {
73+
transform: translateY(-1px);
74+
border-color: #94a3b8;
75+
}
76+
77+
.map-type-filter.is-active {
78+
border-color: #4361ee;
79+
background: #4361ee;
80+
color: white;
81+
}
82+
83+
.map-type-filter-icon {
84+
font-size: 14px;
85+
}
86+
87+
.map-type-filter-count {
88+
display: inline-flex;
89+
align-items: center;
90+
justify-content: center;
91+
min-width: 18px;
92+
height: 18px;
93+
padding: 0 5px;
94+
border-radius: 999px;
95+
background: rgba(100, 116, 139, 0.12);
96+
color: #475569;
97+
font-size: 10px;
98+
}
99+
100+
.map-type-filter.is-active .map-type-filter-count {
101+
background: rgba(255, 255, 255, 0.22);
102+
color: white;
103+
}
104+
105+
.map-type-filter-clear {
106+
border-color: rgba(67, 97, 238, 0.45);
107+
color: #4361ee;
108+
}
109+
110+
.map-empty-filter {
111+
position: absolute;
112+
left: 50%;
113+
bottom: 16px;
114+
z-index: 4;
115+
transform: translateX(-50%);
116+
padding: 8px 12px;
117+
border-radius: 999px;
118+
background: rgba(15, 23, 42, 0.86);
119+
color: white;
120+
font-size: 12px;
121+
font-weight: 700;
122+
box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
123+
pointer-events: none;
124+
}
125+
22126
/* Custom typed markers */
23127
.custom-marker {
24128
background: transparent !important;
@@ -153,6 +257,40 @@
153257
border-radius: 10px;
154258
}
155259

260+
.map-type-filters {
261+
top: 8px;
262+
left: 8px;
263+
right: 8px;
264+
}
265+
266+
.map-type-filter-scroll {
267+
gap: 5px;
268+
padding-bottom: 4px;
269+
}
270+
271+
.map-type-filter {
272+
min-height: 30px;
273+
padding: 6px 8px;
274+
font-size: 11px;
275+
box-shadow: 0 5px 14px rgba(15, 23, 42, 0.14);
276+
}
277+
278+
.map-type-filter-icon {
279+
font-size: 13px;
280+
}
281+
282+
.map-type-filter-count {
283+
min-width: 16px;
284+
height: 16px;
285+
font-size: 9px;
286+
}
287+
288+
.map-empty-filter {
289+
bottom: 10px;
290+
max-width: calc(100% - 24px);
291+
text-align: center;
292+
}
293+
156294
.marker-icon {
157295
width: 32px;
158296
height: 32px;

0 commit comments

Comments
 (0)