|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <title>ParkIt – Stadium Parking Map</title> |
| 6 | + <link rel="stylesheet" href="style.css"> |
| 7 | + <!-- Leaflet CSS --> |
| 8 | + <link |
| 9 | + rel="stylesheet" |
| 10 | + href="https://unpkg.com/leaflet/dist/leaflet.css" |
| 11 | + /> |
| 12 | + <style> |
| 13 | + #map { height: 500px; width: 100%; margin-top: 20px; border-radius: 12px; } |
| 14 | + .container { padding: 20px; } |
| 15 | + </style> |
| 16 | +</head> |
| 17 | +<body> |
| 18 | + <header class="site-header"> |
| 19 | + <h1>Stadium Parking Map</h1> |
| 20 | + </header> |
| 21 | + |
| 22 | + <main class="container"> |
| 23 | + <p>Click markers to see nearby parking options and prices!</p> |
| 24 | + <div id="map"></div> |
| 25 | + </main> |
| 26 | + |
| 27 | + <!-- Leaflet JS --> |
| 28 | + <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script> |
| 29 | + <script> |
| 30 | + // Initialize map centered on Los Angeles |
| 31 | + const map = L.map('map').setView([34.0522, -118.2437], 11); |
| 32 | + |
| 33 | + // Add OpenStreetMap tiles |
| 34 | + L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 35 | + attribution: '© OpenStreetMap contributors' |
| 36 | + }).addTo(map); |
| 37 | + |
| 38 | + // Sample stadiums with nearby parking spots |
| 39 | + const parkingSpots = [ |
| 40 | + // SoFi Stadium (Inglewood) - nearby streets |
| 41 | + { name: "SoFi Stadium Spot 1", lat: 33.9518, lng: -118.3410, price: "$25" }, |
| 42 | + { name: "SoFi Stadium Spot 2", lat: 33.9495, lng: -118.3385, price: "$30" }, |
| 43 | + |
| 44 | + // Crypto.com Arena (Downtown LA) - nearby streets |
| 45 | + { name: "Crypto Arena Spot 1", lat: 34.0420, lng: -118.2650, price: "$20" }, |
| 46 | + { name: "Crypto Arena Spot 2", lat: 34.0445, lng: -118.2685, price: "$22" }, |
| 47 | + |
| 48 | + // YouTube Theater (Hollywood) - nearby streets |
| 49 | + { name: "YouTube Theater Spot 1", lat: 34.0950, lng: -118.3250, price: "$18" }, |
| 50 | + { name: "YouTube Theater Spot 2", lat: 34.0975, lng: -118.3270, price: "$20" }, |
| 51 | + |
| 52 | + // Intuit Dome (Inglewood) - nearby streets |
| 53 | + { name: "Intuit Dome Spot 1", lat: 33.9575, lng: -118.3455, price: "$28" }, |
| 54 | + { name: "Intuit Dome Spot 2", lat: 33.9560, lng: -118.3415, price: "$30" } |
| 55 | + ]; |
| 56 | + |
| 57 | + // Add markers to map |
| 58 | + parkingSpots.forEach(spot => { |
| 59 | + L.marker([spot.lat, spot.lng]) |
| 60 | + .addTo(map) |
| 61 | + .bindPopup(`<strong>${spot.name}</strong><br>${spot.price}`); |
| 62 | + }); |
| 63 | + </script> |
| 64 | +</body> |
| 65 | +</html> |
0 commit comments