Fix map tiles (drop keyed CARTO for free OSM + CSS dark filter), restore corrupted parseSkateCoach in types.ts
Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
This commit is contained in:
parent
1c4987c8bf
commit
8a6d84ca3d
4 changed files with 17 additions and 17 deletions
|
|
@ -852,10 +852,15 @@ export function SpotMap({
|
|||
maxBoundsViscosity: 1.0,
|
||||
});
|
||||
|
||||
L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png', {
|
||||
// Free, no-API-key basemap: OpenStreetMap standard tiles, darkened via a CSS
|
||||
// filter (see the `.skatespots-dark-tiles` rule in index.css) so it matches
|
||||
// the app's dark theme without depending on a keyed provider like CARTO.
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '',
|
||||
subdomains: 'abcd',
|
||||
subdomains: 'abc',
|
||||
minZoom: 2,
|
||||
maxZoom: 19,
|
||||
className: 'skatespots-dark-tiles',
|
||||
}).addTo(map);
|
||||
|
||||
// Add click handler if enabled
|
||||
|
|
|
|||
|
|
@ -724,3 +724,11 @@ select {
|
|||
height: 54mm !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Dark basemap without a keyed tile provider ──
|
||||
We use free OpenStreetMap standard tiles and darken them client-side with a
|
||||
CSS filter so the map matches the app's dark UI. Applied via the tileLayer
|
||||
`className: 'skatespots-dark-tiles'` in SpotMap.tsx. */
|
||||
.skatespots-dark-tiles {
|
||||
filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9) saturate(0.7);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1735,18 +1735,7 @@ export interface TourSponsor {
|
|||
challengeId?: string; // If sponsoring a specific challenge
|
||||
}
|
||||
|
||||
export function parseSkateJudge(event: NostrEvent): SkateJudge | null {
|
||||
if (event.kind !== SKATE_JUDGE_KIND) return null;
|
||||
|
||||
const judge = {
|
||||
name: event.tags.find(([name]) => name === 'name')?.[1] || 'Unknown Judge',
|
||||
expertise: event.tags.find(([name]) => name === 'expertise')?.[1] || '',
|
||||
experience: event.tags.find(([name]) => name === 'experience')?.[1] || '',
|
||||
events_judged: event.tags.find(([name]) => name === 'events_judged')?.[1] || '0',
|
||||
};
|
||||
|
||||
return judge;
|
||||
}
|
||||
export function parseSkateCoach(event: NostrEvent): SkateCoach | null {
|
||||
if (event.kind !== SKATE_COACH_KIND) return null;
|
||||
|
||||
const d = event.tags.find(([name]) => name === 'd')?.[1];
|
||||
|
|
|
|||
|
|
@ -1631,9 +1631,7 @@ export default function MapPage() {
|
|||
className="absolute left-1.5 z-[999] pointer-events-none bottom-[calc(5rem+env(safe-area-inset-bottom,0px)+0.25rem)] md:bottom-1.5"
|
||||
>
|
||||
<div className="bg-black/40 backdrop-blur-sm px-1 py-px rounded text-[8px] text-gray-500/80 leading-none pointer-events-auto">
|
||||
<a href="https://carto.com/attributions" target="_blank" rel="noopener noreferrer" className="hover:text-gray-300 transition-colors">CARTO</a>
|
||||
{' · '}
|
||||
<a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer" className="hover:text-gray-300 transition-colors">OSM</a>
|
||||
<a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener noreferrer" className="hover:text-gray-300 transition-colors">© OpenStreetMap</a>
|
||||
{showBtcMap && (
|
||||
<>{' · '}<a href="https://btcmap.org" target="_blank" rel="noopener noreferrer" className="text-[#f7931a]/60 hover:text-[#f7931a] transition-colors">BTC Map</a></>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue