mapping-mcp-server
Version:
Model Context Protocol server for interactive map visualization with real-time VATSIM aircraft tracking
167 lines (145 loc) • 3.88 kB
HTML
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mapping MCP Server</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<style>
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.map-container {
position: relative;
width: 100vw;
height: 100vh;
}
.map-header {
position: absolute;
top: 10px;
left: 10px;
right: 10px;
background: rgba(255, 255, 255, 0.95);
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
z-index: 1000;
backdrop-filter: blur(10px);
}
.map-header h1 {
margin: 0;
font-size: 1.5rem;
color: #333;
}
.map-header .topic {
margin: 5px 0 0 0;
font-size: 0.9rem;
color: #666;
}
.map-header .stats {
margin: 8px 0 0 0;
font-size: 0.8rem;
color: #888;
}
.leaflet-container {
height: 100vh;
width: 100vw;
}
.aircraft-icon {
font-size: 16px;
color: #2563eb;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
transition: transform 0.2s ease;
}
.aircraft-icon:hover {
transform: scale(1.2);
}
.controller-icon {
font-size: 14px;
color: #dc2626;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.popup-content {
min-width: 200px;
font-size: 13px;
}
.popup-content h3 {
margin: 0 0 8px 0;
color: #1f2937;
font-size: 16px;
}
.popup-content .field {
margin: 4px 0;
display: flex;
justify-content: space-between;
}
.popup-content .field .label {
font-weight: 600;
color: #374151;
margin-right: 8px;
}
.popup-content .field .value {
color: #6b7280;
text-align: right;
}
.no-data {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #6b7280;
z-index: 1000;
background: rgba(255, 255, 255, 0.9);
padding: 30px;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #6b7280;
z-index: 1000;
}
/* Custom marker styles */
.aircraft-marker {
cursor: pointer;
}
.aircraft-marker:hover {
transform: scale(1.2) ;
z-index: 1000;
}
.controller-marker:hover,
.airport-marker:hover,
.waypoint-marker:hover {
transform: scale(1.15) ;
z-index: 1000;
}
.aircraft-marker div,
.controller-marker div,
.airport-marker div,
.waypoint-marker div {
cursor: pointer;
transition: all 0.2s ease;
}
/* Enhanced popup styles */
.leaflet-popup-content-wrapper {
border-radius: 8px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}
.leaflet-popup-tip {
box-shadow: 0 3px 14px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body>
<div id="root"></div>
<script type="module" src="./frontend.tsx"></script>
</body>
</html>