diff --git a/apps/web/app/page.tsx b/apps/web/app/page.tsx index d44ba11..fdef184 100644 --- a/apps/web/app/page.tsx +++ b/apps/web/app/page.tsx @@ -13,7 +13,8 @@ import { AddPinModal } from "@/components/AddPinModal"; import { MapCursor } from "@/components/MapCursor"; import { TargetLine } from "@/components/TargetLine"; import { Polyline } from "@/components/Polyline"; -import { JEEPNEY_ROUTES } from "@/data/map-layers"; +import { Polygon } from "@/components/Polygon"; +import { JEEPNEY_ROUTES, CAMPUS_ZONES, ZONE_CATEGORIES } from "@/data/map-layers"; import { useState, useEffect, useRef, useMemo } from "react"; import { trpc } from "@/lib/trpc"; @@ -45,6 +46,14 @@ export default function Home() { ); }; + const [activeZoneCategories, setActiveZoneCategories] = useState([]); + + const handleToggleZoneCategory = (categoryId: string) => { + setActiveZoneCategories((prev) => + prev.includes(categoryId) ? prev.filter(id => id !== categoryId) : [...prev, categoryId] + ); + }; + const [pendingPinCoords, setPendingPinCoords] = useState<{ lat: number; lng: number; @@ -166,6 +175,23 @@ export default function Home() { /> )} + {CAMPUS_ZONES.map((zone) => { + if (!activeZoneCategories.includes(zone.categoryId)) return null; + + const categoryDef = ZONE_CATEGORIES.find(c => c.id === zone.categoryId); + const zoneColor = categoryDef ? categoryDef.color : "#FFFFFF"; + + return ( + + ); + })} + {JEEPNEY_ROUTES.map((route) => { if (!activeRoutes.includes(route.id)) return null; @@ -190,6 +216,8 @@ export default function Home() { onSearchChange={setSearchQuery} activeRoutes={activeRoutes} onToggleRoute={handleToggleRoute} + activeZoneCategories={activeZoneCategories} + onToggleZoneCategory={handleToggleZoneCategory} /> {/* TARGETING CROSSHAIR (Only visible when armed) */} diff --git a/apps/web/components/Polygon.tsx b/apps/web/components/Polygon.tsx new file mode 100644 index 0000000..8a8fd3d --- /dev/null +++ b/apps/web/components/Polygon.tsx @@ -0,0 +1,92 @@ +"use client"; + +import { useEffect, useRef } from "react"; +import { useMap, useApiIsLoaded } from "@vis.gl/react-google-maps"; + +interface PolygonProps { + paths: { lat: number; lng: number }[]; + fillColor?: string; + fillOpacity?: number; + strokeColor?: string; + strokeOpacity?: number; + strokeWeight?: number; + zIndex?: number; + isPulsating?: boolean; +} + +export function Polygon({ + paths, + fillColor = "#00FF99", + fillOpacity = 0.05, + strokeColor = "#00FF99", + strokeOpacity = 0.8, + strokeWeight = 2, + zIndex = 1, + isPulsating = true +}: PolygonProps) { + const map = useMap(); + const isLoaded = useApiIsLoaded(); + const polygonRef = useRef(null); + const animationRef = useRef(0); + + useEffect(() => { + if (!map || !isLoaded || !window.google) return; + + if (!polygonRef.current) { + polygonRef.current = new window.google.maps.Polygon({ + paths, + fillColor, + fillOpacity, + strokeColor, + strokeOpacity, + strokeWeight, + zIndex, + map, + }); + } else { + polygonRef.current.setOptions({ + paths, + fillColor, + strokeColor, + strokeOpacity, + strokeWeight, + zIndex, + map, + }); + } + + const animatePulse = () => { + if (!polygonRef.current || !isPulsating) return; + + const time = Date.now(); + const speed = 800; + const sineValue = Math.sin(time / speed); + const variance = 0.10; + const currentOpacity = fillOpacity + (sineValue * variance); + const clampedOpacity = Math.max(0.05, Math.min(0.4, currentOpacity)); + + polygonRef.current.setOptions({ + fillOpacity: fillOpacity, + strokeOpacity: 0.6 + (sineValue * 0.3) + }); + + animationRef.current = requestAnimationFrame(animatePulse); + }; + + if (isPulsating) { + cancelAnimationFrame(animationRef.current); + animationRef.current = requestAnimationFrame(animatePulse); + } else { + polygonRef.current.setOptions({ fillOpacity, strokeOpacity }); + } + + return () => { + cancelAnimationFrame(animationRef.current); + if (polygonRef.current) { + polygonRef.current.setMap(null); + } + }; + }, [map, isLoaded, paths, fillColor, fillOpacity, strokeColor, strokeOpacity, strokeWeight, zIndex, isPulsating]); + + return null; +} \ No newline at end of file diff --git a/apps/web/components/TopBar.tsx b/apps/web/components/TopBar.tsx index 262e7d5..9fbb527 100644 --- a/apps/web/components/TopBar.tsx +++ b/apps/web/components/TopBar.tsx @@ -4,7 +4,7 @@ import { useState } from "react"; import { useRouter } from "next/navigation"; import { trpc } from "@/lib/trpc"; import { useSession } from "@/lib/auth-client"; -import { JEEPNEY_ROUTES } from "@/data/map-layers"; +import { JEEPNEY_ROUTES, ZONE_CATEGORIES } from "@/data/map-layers"; export type FilterType = "all" | "academic" | "food" | "social" | "utility"; @@ -16,6 +16,8 @@ interface TopBarProps { onSearchChange: (query: string) => void; activeRoutes?: string[]; onToggleRoute?: (routeId: string) => void; + activeZoneCategories?: string[]; + onToggleZoneCategory?: (categoryId: string) => void; } export function TopBar({ @@ -26,10 +28,13 @@ export function TopBar({ onSearchChange, activeRoutes = [], onToggleRoute = () => {}, + activeZoneCategories = [], + onToggleZoneCategory = () => {}, }: TopBarProps) { const router = useRouter(); const { data: sessionData } = useSession(); const [isTransitMenuOpen, setIsTransitMenuOpen] = useState(false); + const [isZoneMenuOpen, setIsZoneMenuOpen] = useState(false); const handleProfileClick = () => { if (sessionData?.user) { @@ -112,6 +117,47 @@ export function TopBar({ })} )} + + +
+ + + {isZoneMenuOpen && ( +
+ {ZONE_CATEGORIES.map((category) => { + const isActive = activeZoneCategories.includes(category.id); + + return ( + + ); + })} +
+ )}
diff --git a/apps/web/data/map-layers.ts b/apps/web/data/map-layers.ts index b65e769..499a156 100644 --- a/apps/web/data/map-layers.ts +++ b/apps/web/data/map-layers.ts @@ -1,3 +1,18 @@ +export type ZoneCategoryType = "wifi" | "safe" | "logistics"; + +export interface ZoneCategoryDef { + id: ZoneCategoryType; + label: string; + color: string; + initial: string; +} + +export const ZONE_CATEGORIES: ZoneCategoryDef[] = [ + { id: "wifi", label: "Strong WiFi Zones", color: "#00FF99", initial: "W" }, + { id: "safe", label: "24/7 Safe Zones", color: "#00E5FF", initial: "S" }, + { id: "logistics", label: "Logistics & Food", color: "#FF9900", initial: "L" } +]; + export interface TransitRoute { id: string; name: string; @@ -5,6 +20,13 @@ export interface TransitRoute { path: { lat: number; lng: number }[]; } +export interface CampusZone { + id: string; + categoryId: ZoneCategoryType; + name: string; + paths: { lat: number; lng: number }[]; +} + const parseGeoJson = (coords: any[]): { lat: number; lng: number }[] => { const isNested = Array.isArray(coords[0]) && Array.isArray(coords[0][0]); const activeArray = isNested ? coords[0] : coords; @@ -23,6 +45,22 @@ const RAW_SMNORTH_COORDS = [ [ [ 121.06232, 14.65479, 0.0 ], [ 121.06231, 14.65429, 0.0 ], [ 121.06231, 14.65407, 0.0 ], [ 121.06231, 14.65395, 0.0 ], [ 121.06232, 14.65294, 0.0 ], [ 121.06283, 14.65296, 0.0 ], [ 121.06336, 14.65298, 0.0 ], [ 121.06344, 14.65298, 0.0 ], [ 121.06447, 14.65303, 0.0 ], [ 121.06515, 14.65305, 0.0 ], [ 121.06524, 14.65298, 0.0 ], [ 121.06567, 14.65274, 0.0 ], [ 121.06583, 14.65264, 0.0 ], [ 121.06591, 14.65258, 0.0 ], [ 121.06595, 14.65255, 0.0 ], [ 121.06599, 14.65252, 0.0 ], [ 121.06616, 14.65235, 0.0 ], [ 121.06626, 14.65227, 0.0 ], [ 121.06643, 14.65214, 0.0 ], [ 121.06655, 14.65207, 0.0 ], [ 121.06704, 14.65178, 0.0 ], [ 121.06716, 14.65188, 0.0 ], [ 121.06739, 14.65206, 0.0 ], [ 121.0674, 14.65206, 0.0 ], [ 121.06747, 14.65211, 0.0 ], [ 121.06749, 14.65213, 0.0 ], [ 121.06757, 14.65218, 0.0 ], [ 121.0678, 14.65228, 0.0 ], [ 121.06781, 14.65229, 0.0 ], [ 121.06787, 14.65232, 0.0 ], [ 121.06791, 14.65233, 0.0 ], [ 121.06795, 14.65234, 0.0 ], [ 121.06796, 14.65235, 0.0 ], [ 121.06813, 14.65239, 0.0 ], [ 121.0682, 14.65241, 0.0 ], [ 121.06832, 14.65243, 0.0 ], [ 121.06841, 14.65245, 0.0 ], [ 121.06867, 14.65247, 0.0 ], [ 121.07033, 14.65249, 0.0 ], [ 121.07071, 14.6525, 0.0 ], [ 121.07109, 14.65251, 0.0 ], [ 121.07171, 14.65253, 0.0 ], [ 121.0717, 14.65297, 0.0 ], [ 121.07167, 14.65372, 0.0 ], [ 121.07167, 14.65391, 0.0 ], [ 121.07202, 14.65392, 0.0 ], [ 121.07233, 14.65392, 0.0 ], [ 121.07266, 14.65393, 0.0 ], [ 121.0727, 14.65393, 0.0 ], [ 121.07272, 14.65393, 0.0 ], [ 121.07274, 14.65393, 0.0 ], [ 121.07275, 14.65394, 0.0 ], [ 121.07276, 14.65394, 0.0 ], [ 121.07277, 14.65395, 0.0 ], [ 121.07279, 14.65396, 0.0 ], [ 121.0728, 14.65397, 0.0 ], [ 121.07282, 14.65399, 0.0 ], [ 121.07287, 14.65406, 0.0 ], [ 121.07289, 14.65409, 0.0 ], [ 121.07302, 14.65432, 0.0 ], [ 121.07307, 14.65443, 0.0 ], [ 121.07312, 14.65456, 0.0 ], [ 121.07313, 14.65468, 0.0 ], [ 121.07314, 14.65478, 0.0 ], [ 121.07314, 14.65494, 0.0 ], [ 121.07313, 14.65537, 0.0 ], [ 121.07313, 14.65541, 0.0 ], [ 121.07312, 14.65545, 0.0 ], [ 121.07311, 14.65553, 0.0 ], [ 121.07311, 14.65555, 0.0 ], [ 121.0731, 14.6556, 0.0 ], [ 121.07309, 14.65561, 0.0 ], [ 121.07308, 14.65567, 0.0 ], [ 121.07306, 14.65572, 0.0 ], [ 121.07305, 14.65576, 0.0 ], [ 121.07302, 14.65582, 0.0 ], [ 121.073, 14.65586, 0.0 ], [ 121.07295, 14.65593, 0.0 ], [ 121.07283, 14.65612, 0.0 ], [ 121.07282, 14.65616, 0.0 ], [ 121.07282, 14.65618, 0.0 ], [ 121.07279, 14.65624, 0.0 ], [ 121.07277, 14.65627, 0.0 ], [ 121.07277, 14.65652, 0.0 ], [ 121.07276, 14.65691, 0.0 ], [ 121.07275, 14.65754, 0.0 ], [ 121.07274, 14.65792, 0.0 ], [ 121.07275, 14.65863, 0.0 ], [ 121.07275, 14.65866, 0.0 ], [ 121.07275, 14.65887, 0.0 ], [ 121.07275, 14.65915, 0.0 ], [ 121.07274, 14.65937, 0.0 ], [ 121.07266, 14.6594, 0.0 ], [ 121.07255, 14.65942, 0.0 ], [ 121.07253, 14.65942, 0.0 ], [ 121.07249, 14.65942, 0.0 ], [ 121.07161, 14.65942, 0.0 ], [ 121.07064, 14.65942, 0.0 ], [ 121.07049, 14.65942, 0.0 ], [ 121.07012, 14.65941, 0.0 ], [ 121.06945, 14.6594, 0.0 ], [ 121.06848, 14.6594, 0.0 ], [ 121.06846, 14.65924, 0.0 ], [ 121.06845, 14.65903, 0.0 ], [ 121.06846, 14.65875, 0.0 ], [ 121.06849, 14.65753, 0.0 ], [ 121.06785, 14.65755, 0.0 ], [ 121.06784, 14.65755, 0.0 ], [ 121.06733, 14.65755, 0.0 ], [ 121.06695, 14.65756, 0.0 ], [ 121.06676, 14.65756, 0.0 ], [ 121.06649, 14.65756, 0.0 ], [ 121.06612, 14.65757, 0.0 ], [ 121.06576, 14.65757, 0.0 ], [ 121.06535, 14.65758, 0.0 ], [ 121.06529, 14.65758, 0.0 ], [ 121.06479, 14.65758, 0.0 ], [ 121.06458, 14.6576, 0.0 ], [ 121.06437, 14.65762, 0.0 ], [ 121.06413, 14.65764, 0.0 ], [ 121.0638, 14.65766, 0.0 ], [ 121.06356, 14.65768, 0.0 ], [ 121.06346, 14.65768, 0.0 ], [ 121.06317, 14.6577, 0.0 ], [ 121.06308, 14.6577, 0.0 ], [ 121.06261, 14.6577, 0.0 ], [ 121.06235, 14.65769, 0.0 ], [ 121.06232, 14.65696, 0.0 ], [ 121.06232, 14.65683, 0.0 ], [ 121.06232, 14.65659, 0.0 ], [ 121.06234, 14.65599, 0.0 ], [ 121.06234, 14.65579, 0.0 ], [ 121.06234, 14.65552, 0.0 ], [ 121.06233, 14.65496, 0.0 ], [ 121.06025, 14.65492, 0.0 ], [ 121.06006, 14.65492, 0.0 ], [ 121.05839, 14.65488, 0.0 ], [ 121.05693, 14.65486, 0.0 ], [ 121.05678, 14.65486, 0.0 ], [ 121.05662, 14.65486, 0.0 ], [ 121.05652, 14.65487, 0.0 ], [ 121.05633, 14.65488, 0.0 ], [ 121.05626, 14.65488, 0.0 ], [ 121.05609, 14.65489, 0.0 ], [ 121.05595, 14.65491, 0.0 ], [ 121.05586, 14.65492, 0.0 ], [ 121.05585, 14.65493, 0.0 ], [ 121.05583, 14.65494, 0.0 ], [ 121.05581, 14.65494, 0.0 ], [ 121.05579, 14.65496, 0.0 ], [ 121.05577, 14.65497, 0.0 ], [ 121.05576, 14.65499, 0.0 ], [ 121.05574, 14.655, 0.0 ], [ 121.05573, 14.65502, 0.0 ], [ 121.05571, 14.65505, 0.0 ], [ 121.05568, 14.6551, 0.0 ], [ 121.05566, 14.65516, 0.0 ], [ 121.05565, 14.65516, 0.0 ], [ 121.05562, 14.65527, 0.0 ], [ 121.05577, 14.65538, 0.0 ], [ 121.05592, 14.65548, 0.0 ], [ 121.05607, 14.65559, 0.0 ], [ 121.05622, 14.65569, 0.0 ], [ 121.05637, 14.6558, 0.0 ], [ 121.05648, 14.65587, 0.0 ], [ 121.05661, 14.65596, 0.0 ], [ 121.05675, 14.65605, 0.0 ], [ 121.05688, 14.65614, 0.0 ], [ 121.05701, 14.65623, 0.0 ], [ 121.05715, 14.65632, 0.0 ], [ 121.05721, 14.65636, 0.0 ], [ 121.05723, 14.65638, 0.0 ], [ 121.05728, 14.65641, 0.0 ], [ 121.05737, 14.65647, 0.0 ], [ 121.05742, 14.65651, 0.0 ], [ 121.05756, 14.6566, 0.0 ], [ 121.05769, 14.65669, 0.0 ], [ 121.05783, 14.65678, 0.0 ], [ 121.05796, 14.65687, 0.0 ], [ 121.05809, 14.65696, 0.0 ], [ 121.05808, 14.65705, 0.0 ], [ 121.05806, 14.65708, 0.0 ], [ 121.05805, 14.65712, 0.0 ], [ 121.05804, 14.65714, 0.0 ], [ 121.05803, 14.65716, 0.0 ], [ 121.05802, 14.65718, 0.0 ], [ 121.058, 14.65721, 0.0 ], [ 121.05797, 14.65724, 0.0 ], [ 121.05796, 14.65724, 0.0 ], [ 121.05791, 14.6573, 0.0 ], [ 121.0579, 14.65729, 0.0 ], [ 121.05772, 14.65717, 0.0 ], [ 121.05766, 14.65713, 0.0 ], [ 121.05751, 14.65703, 0.0 ], [ 121.05739, 14.65695, 0.0 ], [ 121.05729, 14.6569, 0.0 ], [ 121.05724, 14.65686, 0.0 ], [ 121.05718, 14.65682, 0.0 ], [ 121.057, 14.65671, 0.0 ], [ 121.05688, 14.65662, 0.0 ], [ 121.05673, 14.65652, 0.0 ], [ 121.05658, 14.65642, 0.0 ], [ 121.05642, 14.65632, 0.0 ], [ 121.05627, 14.65622, 0.0 ], [ 121.05541, 14.65568, 0.0 ], [ 121.0551, 14.65548, 0.0 ], [ 121.05493, 14.65538, 0.0 ], [ 121.05478, 14.65528, 0.0 ], [ 121.05462, 14.65518, 0.0 ], [ 121.05445, 14.65508, 0.0 ], [ 121.05428, 14.65497, 0.0 ], [ 121.05417, 14.65491, 0.0 ], [ 121.05413, 14.65487, 0.0 ], [ 121.05382, 14.65467, 0.0 ], [ 121.05374, 14.65457, 0.0 ], [ 121.0537, 14.65451, 0.0 ], [ 121.05258, 14.65366, 0.0 ], [ 121.05223, 14.65343, 0.0 ], [ 121.05217, 14.65339, 0.0 ], [ 121.05195, 14.65325, 0.0 ], [ 121.05182, 14.6532, 0.0 ], [ 121.05178, 14.65319, 0.0 ], [ 121.05168, 14.65315, 0.0 ], [ 121.0516, 14.65313, 0.0 ], [ 121.05154, 14.65312, 0.0 ], [ 121.05145, 14.65312, 0.0 ], [ 121.05138, 14.65313, 0.0 ], [ 121.05132, 14.65314, 0.0 ], [ 121.05111, 14.65317, 0.0 ], [ 121.05083, 14.65348, 0.0 ], [ 121.05078, 14.65354, 0.0 ], [ 121.05072, 14.65362, 0.0 ], [ 121.0506, 14.65374, 0.0 ], [ 121.05042, 14.65387, 0.0 ], [ 121.05023, 14.65398, 0.0 ], [ 121.04991, 14.65414, 0.0 ], [ 121.04965, 14.65425, 0.0 ], [ 121.04938, 14.65436, 0.0 ], [ 121.04909, 14.65443, 0.0 ], [ 121.04883, 14.65445, 0.0 ], [ 121.0486, 14.65445, 0.0 ], [ 121.04846, 14.65445, 0.0 ], [ 121.0483, 14.65443, 0.0 ], [ 121.04809, 14.65439, 0.0 ], [ 121.04792, 14.65435, 0.0 ], [ 121.04788, 14.65433, 0.0 ], [ 121.04773, 14.65427, 0.0 ], [ 121.04757, 14.65419, 0.0 ], [ 121.0475, 14.65416, 0.0 ], [ 121.04745, 14.65412, 0.0 ], [ 121.04734, 14.65404, 0.0 ], [ 121.04729, 14.65401, 0.0 ], [ 121.04723, 14.65396, 0.0 ], [ 121.04701, 14.65369, 0.0 ], [ 121.04691, 14.65357, 0.0 ], [ 121.04683, 14.65344, 0.0 ], [ 121.04674, 14.65329, 0.0 ], [ 121.04665, 14.6531, 0.0 ], [ 121.04659, 14.65294, 0.0 ], [ 121.04654, 14.65279, 0.0 ], [ 121.04649, 14.65268, 0.0 ], [ 121.04645, 14.65261, 0.0 ], [ 121.0464, 14.65254, 0.0 ], [ 121.04635, 14.65248, 0.0 ], [ 121.04628, 14.65243, 0.0 ], [ 121.04614, 14.65232, 0.0 ], [ 121.04611, 14.65229, 0.0 ], [ 121.04609, 14.65229, 0.0 ], [ 121.04607, 14.65228, 0.0 ], [ 121.04604, 14.65227, 0.0 ], [ 121.04602, 14.65227, 0.0 ], [ 121.04593, 14.65227, 0.0 ], [ 121.04563, 14.65233, 0.0 ], [ 121.04535, 14.65239, 0.0 ], [ 121.04483, 14.6525, 0.0 ], [ 121.04461, 14.65255, 0.0 ], [ 121.0444, 14.65259, 0.0 ], [ 121.04373, 14.65274, 0.0 ], [ 121.0434, 14.65282, 0.0 ], [ 121.04287, 14.65293, 0.0 ], [ 121.04231, 14.65305, 0.0 ], [ 121.04159, 14.6532, 0.0 ], [ 121.0395, 14.65366, 0.0 ], [ 121.03869, 14.65383, 0.0 ], [ 121.03853, 14.65386, 0.0 ], [ 121.0376, 14.65406, 0.0 ], [ 121.03693, 14.6542, 0.0 ], [ 121.03629, 14.65435, 0.0 ], [ 121.0356, 14.6545, 0.0 ], [ 121.03519, 14.65459, 0.0 ], [ 121.03521, 14.65473, 0.0 ], [ 121.03539, 14.65545, 0.0 ], [ 121.03586, 14.65745, 0.0 ], [ 121.03592, 14.65767, 0.0 ], [ 121.03607, 14.65837, 0.0 ], [ 121.03604, 14.65839, 0.0 ], [ 121.03602, 14.65841, 0.0 ], [ 121.036, 14.65842, 0.0 ], [ 121.03599, 14.65842, 0.0 ], [ 121.03597, 14.65843, 0.0 ], [ 121.03596, 14.65842, 0.0 ], [ 121.03595, 14.65842, 0.0 ], [ 121.03593, 14.65842, 0.0 ], [ 121.03591, 14.65841, 0.0 ], [ 121.03575, 14.65772, 0.0 ], [ 121.03524, 14.65549, 0.0 ], [ 121.03511, 14.6549, 0.0 ], [ 121.03505, 14.65462, 0.0 ], [ 121.03469, 14.6547, 0.0 ], [ 121.03434, 14.65478, 0.0 ], [ 121.03303, 14.65507, 0.0 ], [ 121.03263, 14.65516, 0.0 ], [ 121.03164, 14.65538, 0.0 ], [ 121.03105, 14.6555, 0.0 ], [ 121.03071, 14.65557, 0.0 ], [ 121.03053, 14.65562, 0.0 ], [ 121.03051, 14.65562, 0.0 ], [ 121.03048, 14.65563, 0.0 ], [ 121.03046, 14.65565, 0.0 ], [ 121.03041, 14.65568, 0.0 ], [ 121.03037, 14.65571, 0.0 ], [ 121.03033, 14.65573, 0.0 ], [ 121.03028, 14.65576, 0.0 ], [ 121.03023, 14.65579, 0.0 ], [ 121.03018, 14.65582, 0.0 ], [ 121.03016, 14.65584, 0.0 ], [ 121.03012, 14.65585, 0.0 ], [ 121.0301, 14.65586, 0.0 ], [ 121.03005, 14.65587, 0.0 ], [ 121.03002, 14.65587, 0.0 ], [ 121.02998, 14.65587, 0.0 ], [ 121.02994, 14.65586, 0.0 ], [ 121.02989, 14.65586, 0.0 ], [ 121.02983, 14.65585, 0.0 ], [ 121.02977, 14.65583, 0.0 ], [ 121.02971, 14.65581, 0.0 ], [ 121.02968, 14.65582, 0.0 ], [ 121.02959, 14.65584, 0.0 ], [ 121.02956, 14.65593, 0.0 ], [ 121.02956, 14.65597, 0.0 ], [ 121.02956, 14.65601, 0.0 ], [ 121.02957, 14.65605, 0.0 ], [ 121.02959, 14.65618, 0.0 ], [ 121.02963, 14.65634, 0.0 ], [ 121.03095, 14.65606, 0.0 ], [ 121.03171, 14.6559, 0.0 ], [ 121.03164, 14.65538, 0.0 ], [ 121.03105, 14.6555, 0.0 ], [ 121.03071, 14.65557, 0.0 ], [ 121.03067, 14.65543, 0.0 ], [ 121.03104, 14.65536, 0.0 ], [ 121.03129, 14.65531, 0.0 ], [ 121.03138, 14.65529, 0.0 ], [ 121.0316, 14.65523, 0.0 ], [ 121.03169, 14.65521, 0.0 ], [ 121.03181, 14.65519, 0.0 ], [ 121.03203, 14.65514, 0.0 ], [ 121.03259, 14.65502, 0.0 ], [ 121.03355, 14.65481, 0.0 ], [ 121.03429, 14.65465, 0.0 ], [ 121.03461, 14.65456, 0.0 ], [ 121.03505, 14.65448, 0.0 ], [ 121.03515, 14.65445, 0.0 ], [ 121.03551, 14.65437, 0.0 ], [ 121.03568, 14.65433, 0.0 ], [ 121.03694, 14.65407, 0.0 ], [ 121.03778, 14.6539, 0.0 ], [ 121.0383, 14.6538, 0.0 ], [ 121.03851, 14.65375, 0.0 ], [ 121.03866, 14.65371, 0.0 ], [ 121.03897, 14.65364, 0.0 ], [ 121.03946, 14.65353, 0.0 ], [ 121.04337, 14.65267, 0.0 ], [ 121.04371, 14.6526, 0.0 ], [ 121.04437, 14.65245, 0.0 ], [ 121.04533, 14.65224, 0.0 ], [ 121.04559, 14.65217, 0.0 ], [ 121.04565, 14.65216, 0.0 ], [ 121.04573, 14.65214, 0.0 ], [ 121.04588, 14.65211, 0.0 ], [ 121.04602, 14.65204, 0.0 ], [ 121.04612, 14.65199, 0.0 ], [ 121.04619, 14.65194, 0.0 ], [ 121.0463, 14.65183, 0.0 ], [ 121.04644, 14.6516, 0.0 ], [ 121.04655, 14.65142, 0.0 ], [ 121.04656, 14.65137, 0.0 ], [ 121.04661, 14.65112, 0.0 ], [ 121.04684, 14.65053, 0.0 ], [ 121.0469, 14.65039, 0.0 ], [ 121.04697, 14.65029, 0.0 ], [ 121.04701, 14.65022, 0.0 ], [ 121.04713, 14.65006, 0.0 ], [ 121.0474, 14.64973, 0.0 ], [ 121.04753, 14.64956, 0.0 ], [ 121.04754, 14.64955, 0.0 ], [ 121.0477, 14.64938, 0.0 ], [ 121.04786, 14.64924, 0.0 ], [ 121.04802, 14.64911, 0.0 ], [ 121.0481, 14.64907, 0.0 ], [ 121.04842, 14.6489, 0.0 ], [ 121.04852, 14.64884, 0.0 ], [ 121.04868, 14.64878, 0.0 ], [ 121.04891, 14.6487, 0.0 ], [ 121.04906, 14.64865, 0.0 ], [ 121.04917, 14.64861, 0.0 ], [ 121.04932, 14.64858, 0.0 ], [ 121.04938, 14.64857, 0.0 ], [ 121.0495, 14.64854, 0.0 ], [ 121.04959, 14.64853, 0.0 ], [ 121.04966, 14.64851, 0.0 ], [ 121.04977, 14.6485, 0.0 ], [ 121.04999, 14.64851, 0.0 ], [ 121.05013, 14.64852, 0.0 ], [ 121.05027, 14.64854, 0.0 ], [ 121.05035, 14.64856, 0.0 ], [ 121.0504, 14.64857, 0.0 ], [ 121.05045, 14.64859, 0.0 ], [ 121.05054, 14.64862, 0.0 ], [ 121.05064, 14.64865, 0.0 ], [ 121.0507, 14.64867, 0.0 ], [ 121.05076, 14.6487, 0.0 ], [ 121.05084, 14.64873, 0.0 ], [ 121.05094, 14.64878, 0.0 ], [ 121.05109, 14.64887, 0.0 ], [ 121.05127, 14.64903, 0.0 ], [ 121.05142, 14.6492, 0.0 ], [ 121.05156, 14.64937, 0.0 ], [ 121.0517, 14.64955, 0.0 ], [ 121.05182, 14.64975, 0.0 ], [ 121.0519, 14.64994, 0.0 ], [ 121.05196, 14.65014, 0.0 ], [ 121.05199, 14.65031, 0.0 ], [ 121.05201, 14.65046, 0.0 ], [ 121.05201, 14.6506, 0.0 ], [ 121.05202, 14.65079, 0.0 ], [ 121.05202, 14.65099, 0.0 ], [ 121.05201, 14.65114, 0.0 ], [ 121.05198, 14.65133, 0.0 ], [ 121.05194, 14.65151, 0.0 ], [ 121.0519, 14.65171, 0.0 ], [ 121.0518, 14.65211, 0.0 ], [ 121.05171, 14.65231, 0.0 ], [ 121.05175, 14.65251, 0.0 ], [ 121.05178, 14.65265, 0.0 ], [ 121.05181, 14.65275, 0.0 ], [ 121.05188, 14.65289, 0.0 ], [ 121.05209, 14.65309, 0.0 ], [ 121.05255, 14.65334, 0.0 ], [ 121.05268, 14.65341, 0.0 ], [ 121.05285, 14.65351, 0.0 ], [ 121.05286, 14.65351, 0.0 ], [ 121.05303, 14.65361, 0.0 ], [ 121.05321, 14.65371, 0.0 ], [ 121.05338, 14.6538, 0.0 ], [ 121.05356, 14.6539, 0.0 ], [ 121.05373, 14.654, 0.0 ], [ 121.05391, 14.6541, 0.0 ], [ 121.05396, 14.65412, 0.0 ], [ 121.05399, 14.65413, 0.0 ], [ 121.05413, 14.65422, 0.0 ], [ 121.05421, 14.6542, 0.0 ], [ 121.05426, 14.6542, 0.0 ], [ 121.05434, 14.65421, 0.0 ], [ 121.05489, 14.65433, 0.0 ], [ 121.05549, 14.65449, 0.0 ], [ 121.05572, 14.65454, 0.0 ], [ 121.05585, 14.65457, 0.0 ], [ 121.05616, 14.65463, 0.0 ], [ 121.05632, 14.65465, 0.0 ], [ 121.05649, 14.65467, 0.0 ], [ 121.0565, 14.65467, 0.0 ], [ 121.05658, 14.65468, 0.0 ], [ 121.05666, 14.65469, 0.0 ], [ 121.05683, 14.65471, 0.0 ], [ 121.05693, 14.65471, 0.0 ], [ 121.05709, 14.65472, 0.0 ], [ 121.05743, 14.65472, 0.0 ], [ 121.05807, 14.65472, 0.0 ], [ 121.0584, 14.65473, 0.0 ], [ 121.06026, 14.65476, 0.0 ], [ 121.06232, 14.65479, 0.0 ] ] ]; +const RAW_NIGS_COORDS = [ + [ [ 121.0691536, 14.6477643, 0.0 ], [ 121.0693386, 14.6477604, 0.0 ], [ 121.0693386, 14.6476293, 0.0 ], [ 121.0695948, 14.647628, 0.0 ], [ 121.0695921, 14.6476449, 0.0 ], [ 121.0696028, 14.6476449, 0.0 ], [ 121.0696042, 14.6477176, 0.0 ], [ 121.0696337, 14.6477176, 0.0 ], [ 121.0696364, 14.6476021, 0.0 ], [ 121.0698523, 14.6476034, 0.0 ], [ 121.0698523, 14.6476812, 0.0 ], [ 121.0698214, 14.6476838, 0.0 ], [ 121.0698214, 14.6480731, 0.0 ], [ 121.0697369, 14.6480731, 0.0 ], [ 121.0697369, 14.6480912, 0.0 ], [ 121.0698201, 14.6480886, 0.0 ], [ 121.0698187, 14.6481963, 0.0 ], [ 121.0697517, 14.6482002, 0.0 ], [ 121.0697557, 14.6482288, 0.0 ], [ 121.0697731, 14.6482288, 0.0 ], [ 121.0697785, 14.6484, 0.0 ], [ 121.0696042, 14.6484013, 0.0 ], [ 121.0696028, 14.6482807, 0.0 ], [ 121.0695814, 14.6482794, 0.0 ], [ 121.06958, 14.6483222, 0.0 ], [ 121.0693601, 14.6483209, 0.0 ], [ 121.0693601, 14.6482599, 0.0 ], [ 121.0693386, 14.6482638, 0.0 ], [ 121.0693386, 14.6483962, 0.0 ], [ 121.0691643, 14.6484, 0.0 ], [ 121.0691629, 14.6482184, 0.0 ], [ 121.0691924, 14.6482197, 0.0 ], [ 121.0691924, 14.6481873, 0.0 ], [ 121.0691616, 14.6481873, 0.0 ], [ 121.0691536, 14.6477643, 0.0 ] ] +]; + +const RAW_IMATH_COORDS = [ + [ [ 121.071076, 14.6484879, 0.0 ], [ 121.0711739, 14.6483517, 0.0 ], [ 121.0712235, 14.6483828, 0.0 ], [ 121.0712785, 14.6483076, 0.0 ], [ 121.0716929, 14.6485658, 0.0 ], [ 121.0716848, 14.6485852, 0.0 ], [ 121.0717184, 14.6486008, 0.0 ], [ 121.0717358, 14.6486462, 0.0 ], [ 121.0716728, 14.6486657, 0.0 ], [ 121.0717237, 14.6487007, 0.0 ], [ 121.0716419, 14.6488331, 0.0 ], [ 121.0716003, 14.6488136, 0.0 ], [ 121.0715614, 14.6488707, 0.0 ], [ 121.0715226, 14.6488512, 0.0 ], [ 121.0714998, 14.6488811, 0.0 ], [ 121.0711068, 14.6486384, 0.0 ], [ 121.0711377, 14.6485995, 0.0 ], [ 121.0711175, 14.6485917, 0.0 ], [ 121.0711122, 14.6486073, 0.0 ], [ 121.0710626, 14.6485749, 0.0 ], [ 121.0711001, 14.6485217, 0.0 ], [ 121.0711108, 14.6485308, 0.0 ], [ 121.0711202, 14.6485126, 0.0 ], [ 121.071076, 14.6484879, 0.0 ] ] +]; + +const RAW_QUEZONHALL_COORDS = [ + [ [ 121.0649995, 14.6554956, 0.0 ], [ 121.0650049, 14.6553581, 0.0 ], [ 121.0650076, 14.6551401, 0.0 ], [ 121.0649781, 14.6551427, 0.0 ], [ 121.0649794, 14.6550817, 0.0 ], [ 121.0649553, 14.655083, 0.0 ], [ 121.0649647, 14.6547859, 0.0 ], [ 121.0649861, 14.6547859, 0.0 ], [ 121.0649861, 14.6547535, 0.0 ], [ 121.065029, 14.6547548, 0.0 ], [ 121.0650358, 14.654385, 0.0 ], [ 121.0651806, 14.6543863, 0.0 ], [ 121.0651779, 14.6547509, 0.0 ], [ 121.0651565, 14.6547496, 0.0 ], [ 121.0651497, 14.6554956, 0.0 ], [ 121.0649995, 14.6554956, 0.0 ] ] +]; + +const RAW_MELCHORPARKINGLOT_COORDS = [ + [ [ 121.0688367, 14.6571539, 0.0 ], [ 121.0688313, 14.6569229, 0.0 ], [ 121.0692309, 14.6569203, 0.0 ], [ 121.0692296, 14.6571578, 0.0 ], [ 121.0691947, 14.6571591, 0.0 ], [ 121.0691947, 14.6570968, 0.0 ], [ 121.0690727, 14.6570994, 0.0 ], [ 121.0690727, 14.6571565, 0.0 ], [ 121.0688367, 14.6571539, 0.0 ] ] +]; + export const JEEPNEY_ROUTES: TransitRoute[] = [ { id: "route-ikot", @@ -37,4 +75,31 @@ export const JEEPNEY_ROUTES: TransitRoute[] = [ color: "#8ECE63", path: parseGeoJson(RAW_SMNORTH_COORDS), }, +]; + +export const CAMPUS_ZONES: CampusZone[] = [ + { + id: "zone-nigs", + categoryId: "wifi", + name: "NIGS", + paths: parseGeoJson(RAW_NIGS_COORDS) + }, + { + id: "zone-imath", + categoryId: "wifi", + name: "IMath", + paths: parseGeoJson(RAW_IMATH_COORDS) + }, + { + id: "zone-quezon-hall", + categoryId: "safe", + name: "Quezon Hall", + paths: parseGeoJson(RAW_QUEZONHALL_COORDS) + }, + { + id: "zone-melchor-parking-lot", + categoryId: "logistics", + name: "CHK Complex", + paths: parseGeoJson(RAW_MELCHORPARKINGLOT_COORDS) + }, ]; \ No newline at end of file