-
- {/* Mock campus blocks */}
- {[
- { label: 'CSE Block', x: '20%', y: '25%', w: '14%', h: '18%' },
- { label: 'ECE Block', x: '38%', y: '25%', w: '12%', h: '18%' },
- { label: 'Library', x: '58%', y: '30%', w: '16%', h: '14%' },
- { label: 'Canteen', x: '65%', y: '58%', w: '12%', h: '12%' },
- { label: 'Hostel', x: '18%', y: '58%', w: '14%', h: '20%' },
- { label: 'Auditorium', x: '40%', y: '55%', w: '18%', h: '14%' },
- ].map((block, i) => (
-
-
- {block.label}
-
-
- ))}
+
+
+ {/* Map Viewer Header Bar */}
+
+
+
+
+ Official Blueprint
+
+
+ Interactive Location Spotter
+
+
+
+ Rajalakshmi Institute of Technology
+
+
+
+ Kuthambakkam, Chennai • Interactive Map Spotting Enabled
+
+
- {/* Pin */}
-
-
-
-
RIT Campus, Kuthambakkam, Chennai
+ {/* Toolbar Controls */}
+
+ {/* Zoom Controls */}
+
+
+
+
+
+ {Math.round(zoomLevel * 100)}%
+
+
+
+
+
+
+ {/* Fullscreen Button */}
+
setIsFullscreen(true)}
+ className="p-2 bg-slate-800/80 hover:bg-slate-700/80 text-slate-200 hover:text-white rounded-xl border border-slate-700 transition-colors cursor-pointer"
+ title="Expand to Fullscreen"
+ >
+
+
+
+ {/* Download Button */}
+
+
+ Download
+
+
+
+
+ {/* Blueprint Main Canvas Container with Spotting Markers */}
+
+
+
+ {/* Main Campus Map Image Container */}
+
+
+
+ {/* Interactive Spot Markers overlayed on map image */}
+ {LOCATION_SPOTS.map((spot) => {
+ const isHighlighted = highlightedSpotNames.has(spot.name);
+ const isSelected = selectedFacility?.name === spot.name;
+
+ return (
+
setSelectedFacility(spot)}
+ >
+ {/* Glowing Pulsing Ring if Highlighted */}
+ {isHighlighted && (
+
+ )}
+
+ {/* Spot Pin Button */}
+
+
+
+ {/* Hover / Highlight Tooltip Label */}
+
+ {spot.name}
+
+
+
+ );
+ })}
+
+
+
+
+ {/* Active Spotting Info Banner Overlay at Bottom */}
+
+ {activeCategory ? (
+
+
+ Spotting Category: {CAMPUS_LOCATIONS.find((c) => c.id === activeCategory)?.name} ({highlightedSpotNames.size} Locations)
+ setActiveCategory(null)} className="ml-2 hover:opacity-75 cursor-pointer">
+
+
+
+ ) : selectedFacility ? (
+
+
+ Spotted: {selectedFacility.name} ({selectedFacility.area})
+ setSelectedFacility(null)} className="ml-2 hover:opacity-75 cursor-pointer">
+
+
+
+ ) : (
+
+
+ Click any category below to spot on map
+
+ )}
+
+
+
+ {/* Quick Location Categories Bar */}
+
+
+
+ Quick Location Categories
+
+ {activeCategory && (
+ setActiveCategory(null)}
+ className="text-xs font-semibold text-orange-500 hover:text-orange-600 flex items-center gap-1 cursor-pointer"
+ >
+ Clear Spot Filter
+
+ )}
+
+
+ {CAMPUS_LOCATIONS.map((loc) => {
+ const Icon = (LucideIcons as unknown as Record
>)[loc.icon];
+ const isCatActive = activeCategory === loc.id;
+ return (
+ handleCategoryClick(loc.id)}
+ className={`flex flex-col items-center gap-2.5 p-3 rounded-2xl transition-all border cursor-pointer group ${
+ isCatActive
+ ? 'border-orange-500 bg-orange-500 text-white shadow-lg ring-2 ring-orange-400/30'
+ : 'border-transparent hover:border-[#FED7AA] hover:bg-orange-50/50'
+ }`}
+ >
+
+ {Icon && }
+
+
+ {loc.name}
+
+
+ );
+ })}
+
+
+
+ {/* Blueprint Legend & Color Key */}
+
+
+
+
+ Blueprint Map Legend
+
+
+
+ {BLUEPRINT_LEGEND.map((item) => {
+ const isActive = activeLegend === item.id;
+ return (
+ {
+ setActiveLegend(item.id);
+ setActiveCategory(null);
+ setSelectedFacility(null);
+ }}
+ className={`flex items-center gap-2.5 px-4 py-2 rounded-full border transition-all cursor-pointer ${
+ isActive
+ ? 'border-[#F97316] bg-orange-500 text-white shadow-md scale-105'
+ : `${item.border} ${item.bg} ${item.text} hover:scale-105`
+ }`}
+ >
+
+
+ {item.label}
+
+
+ );
+ })}
+
+
+
+ {/* Blueprint Facilities List & Quick Selector */}
+
+
+
+
+
+
+ Campus Blocks & Facilities Index
+
+
+
+ Click any facility card below to spot its exact location on the campus map image.
+
+
+
+ {filteredFacilities.length} Locations Mapped
+
+
+
+
+ {filteredFacilities.map((facility) => {
+ const isSelected = selectedFacility?.name === facility.name;
+ const isHighlighted = highlightedSpotNames.has(facility.name);
+ return (
+
{
+ if (isSelected) {
+ setSelectedFacility(null);
+ } else {
+ setSelectedFacility(facility);
+ setActiveCategory(null);
+ }
+ }}
+ className={`text-left p-4 rounded-2xl border transition-all cursor-pointer ${
+ isSelected
+ ? 'border-[#F97316] bg-orange-500 text-white shadow-lg ring-2 ring-orange-400/40'
+ : isHighlighted
+ ? 'border-[#F97316] bg-orange-50/90 shadow-md'
+ : 'border-[#E5E7EB] bg-[#F8FAFC] hover:bg-white hover:border-orange-200 hover:shadow-xs'
+ }`}
+ >
+
+
+ {facility.name}
+
+
+ {facility.area}
+
+
+
+ {facility.desc}
+
+
+ );
+ })}
+
+
+
+ {/* Fullscreen Lightbox Modal */}
+
+ {isFullscreen && (
+
+
+
+
+
RIT Campus Blueprint — Fullscreen Spotter
+
+
+ setIsFullscreen(false)}
+ className="p-2 rounded-xl bg-white/10 hover:bg-white/20 text-white transition-colors cursor-pointer"
+ >
+
+
-
- {/* Quick Nav */}
-
- {CAMPUS_LOCATIONS.map((loc) => {
- const Icon = (LucideIcons as unknown as Record
>)[loc.icon];
- return (
-
-
- {Icon && }
-
-
- {loc.name}
-
-
- );
- })}
-
-
-
+
+
+
+ {LOCATION_SPOTS.map((spot) => {
+ const isHighlighted = highlightedSpotNames.has(spot.name);
+ const isSelected = selectedFacility?.name === spot.name;
+ return (
+
setSelectedFacility(spot)}
+ >
+
+
+ );
+ })}
+
+
+
+ )}
+
+
+ {/* Quick Nav */}
+
+ {CAMPUS_LOCATIONS.map((loc) => {
+ const Icon = (LucideIcons as unknown as Record
>)[loc.icon];
+ return (
+
+
+ {Icon && }
+
+
+ {loc.name}
+
+
+ );
+ })}
+
+
)}
{/* Bus Routes Tab */}
@@ -388,7 +891,7 @@ export default function Campus() {
)}