infinite-agents-public/mapbox_test/mapbox_globe_1/index.html

176 lines
4.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Globe Viz 1: Global Population Distribution</title>
<link href="https://api.mapbox.com/mapbox-gl-js/v3.0.1/mapbox-gl.css" rel="stylesheet">
<script src="https://api.mapbox.com/mapbox-gl-js/v3.0.1/mapbox-gl.js"></script>
<style>
body {
margin: 0;
padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
.title-overlay {
position: absolute;
top: 20px;
left: 20px;
background: rgba(0, 0, 0, 0.8);
color: #ffffff;
padding: 15px 20px;
border-radius: 8px;
z-index: 1;
max-width: 350px;
}
.title-overlay h1 {
margin: 0 0 8px 0;
font-size: 24px;
font-weight: 600;
}
.title-overlay p {
margin: 0;
font-size: 14px;
color: #cccccc;
}
.legend {
position: absolute;
bottom: 30px;
right: 20px;
background: rgba(0, 0, 0, 0.8);
color: #ffffff;
padding: 15px;
border-radius: 8px;
z-index: 1;
}
.legend h3 {
margin: 0 0 10px 0;
font-size: 16px;
font-weight: 600;
}
.legend-item {
display: flex;
align-items: center;
margin: 8px 0;
font-size: 13px;
}
.legend-circle {
border-radius: 50%;
margin-right: 10px;
background: rgba(255, 99, 71, 0.8);
}
.info-panel {
position: absolute;
top: 20px;
right: 20px;
background: rgba(0, 0, 0, 0.8);
color: #ffffff;
padding: 12px 15px;
border-radius: 8px;
z-index: 1;
font-size: 13px;
}
.info-panel .label {
color: #888888;
margin-bottom: 4px;
}
.info-panel .value {
font-size: 18px;
font-weight: 600;
color: #ff6347;
}
.mapboxgl-popup-content {
background: rgba(0, 0, 0, 0.9);
color: #ffffff;
padding: 12px 15px;
border-radius: 6px;
}
.mapboxgl-popup-content h3 {
margin: 0 0 8px 0;
font-size: 16px;
color: #ff6347;
}
.mapboxgl-popup-content p {
margin: 4px 0;
font-size: 13px;
}
.mapboxgl-popup-tip {
border-top-color: rgba(0, 0, 0, 0.9) !important;
}
.mapboxgl-ctrl-group {
background: rgba(0, 0, 0, 0.8) !important;
}
.mapboxgl-ctrl-group button {
background-color: transparent !important;
}
.mapboxgl-ctrl-group button:hover {
background-color: rgba(255, 255, 255, 0.1) !important;
}
</style>
</head>
<body>
<div id="map"></div>
<div class="title-overlay">
<h1>Global Population Distribution</h1>
<p>Visualizing the world's major urban centers on an interactive 3D globe</p>
</div>
<div class="info-panel">
<div class="label">Total Cities</div>
<div class="value" id="city-count">Loading...</div>
</div>
<div class="legend">
<h3>Population Size</h3>
<div class="legend-item">
<div class="legend-circle" style="width: 24px; height: 24px;"></div>
<span>30M+ people</span>
</div>
<div class="legend-item">
<div class="legend-circle" style="width: 18px; height: 18px;"></div>
<span>20M - 30M</span>
</div>
<div class="legend-item">
<div class="legend-circle" style="width: 14px; height: 14px;"></div>
<span>10M - 20M</span>
</div>
<div class="legend-item">
<div class="legend-circle" style="width: 10px; height: 10px;"></div>
<span>5M - 10M</span>
</div>
<div class="legend-item">
<div class="legend-circle" style="width: 6px; height: 6px;"></div>
<span>1M - 5M</span>
</div>
</div>
<script src="src/data/population-data.js"></script>
<script type="module" src="src/index.js"></script>
</body>
</html>