feat: add world map functionality and admin map management

- Added world map page with interactive marker display
- Implemented admin map management for marker CRUD operations
- Added map layers and markers seed data to database
- Integrated new routes for map functionality
- Updated database configuration for production environment
- Added documentation page route
- Enhanced package.json with required dependencies for map features
This commit is contained in:
Lars Behrends
2026-01-02 05:08:07 +01:00
parent ea2b803534
commit 065a6e657d
152 changed files with 5024 additions and 35 deletions

View File

@@ -191,6 +191,45 @@ const CityProfile: React.FC = () => {
</div>
</section>
)}
{/* Map Preview */}
<section>
<h3 className="text-xl font-bold mb-4 flex items-center gap-2">
<Icons.Map className="w-5 h-5 text-accentInfo" /> Standort auf der Weltkarte
</h3>
<div className="relative aspect-video bg-surface border border-border rounded-xl overflow-hidden">
<img
src="/api/map/world-map"
alt="Weltkarte"
className="w-full h-full object-contain opacity-80"
onError={(e) => {
e.currentTarget.src = 'data:image/svg+xml;utf8,' + encodeURIComponent(`
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="600" viewBox="0 0 800 600">
<rect width="800" height="600" fill="#1f2937"/>
<text x="400" y="300" text-anchor="middle" fill="#9ca3af" font-family="Arial" font-size="24">Weltkarte nicht verfügbar</text>
<text x="400" y="340" text-anchor="middle" fill="#9ca3af" font-family="Arial" font-size="16">Bitte zuerst im Admin-Bereich zusammensetzen</text>
</svg>
`);
}}
/>
{/* City marker */}
<div className="absolute top-4 left-4 bg-black/60 text-white px-3 py-2 rounded-lg border border-white/20">
<div className="flex items-center gap-2">
<div className="w-3 h-3 rounded-full bg-accentInfo"></div>
<span className="font-medium">{city.name}</span>
</div>
<div className="text-xs text-gray-300 mt-1">Stadtmarker</div>
</div>
<div className="absolute bottom-4 right-4">
<button
onClick={() => navigate('/world-map')}
className="bg-accentInfo text-white px-4 py-2 rounded-lg hover:bg-accentInfo/90 transition-colors text-sm font-medium"
>
Zur Weltkarte
</button>
</div>
</div>
</section>
</div>
{city.cityStats && (