Преглед на файлове

fix: OSM тайлы + CSS-фильтр invert для тёмной темы со зданиями

neyrogovnarik преди 1 месец
родител
ревизия
235607f8e0
променени са 2 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 1 0
      frontend/src/components/MapView.tsx
  2. 1 1
      frontend/src/lib/map.ts

+ 1 - 0
frontend/src/components/MapView.tsx

@@ -134,6 +134,7 @@ export default function MapView() {
 
   return (
     <div className="relative h-full w-full">
+      <style>{'.leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9); }'}</style>
       {mapError ? (
         <div className="flex h-full w-full items-center justify-center">
           <div className="text-center">

+ 1 - 1
frontend/src/lib/map.ts

@@ -18,7 +18,7 @@ export interface MarkerOptions {
   color?: string
 }
 
-const TILE_URL = 'https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png'
+const TILE_URL = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
 const MARKER_COLORS: Record<string, string> = {
   place: '#FFF82A',
   studio: '#FF80DF',