[

и код map.html
Код: Выделить всё
OpenStreetMap Image Overlay
#map { height: 600px; width: 100%; }
// Initialize the map centered on the USA
var map = L.map('map').setView([39.8283, -98.5795], 5);
// Add the OpenStreetMap base layer
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© [url=www.openstreetmap.org]OpenStreetMap[/url] contributors'
}).addTo(map);
// --- Image Overlay Configuration ---
// IMPORTANT: The image must be in the same folder as this HTML file for this path to work
var imageUrl = 'Radar_20251120_202150_1.png';
// Define the geographic bounds of the image (latitude and longitude)
// You MUST replace these placeholder coordinates with the actual bounds for your specific radar image.
var southWest = L.latLng(25.5, -125.0); // Example: Bottom-left corner (Lat, Lng)
var northEast = L.latLng(50.0, -60.0); // Example: Top-right corner (Lat, Lng)
var imageBounds = L.latLngBounds(southWest, northEast);
// Add the image overlay to the map
L.imageOverlay(imageUrl, imageBounds, {
opacity: 0.8,
alt: 'Weather radar overlay'
}).addTo(map);
// Optional: Zoom the map to fit the bounds of the radar image
map.fitBounds(imageBounds);
Код: Выделить всё
D:\>python -m http.server 8000
Serving HTTP on :: port 8000 (http://[::]:8000/) ...
::1 - - [23/Nov/2025 18:05:14] "GET /map.html HTTP/1.1" 200 -
::1 - - [23/Nov/2025 18:05:14] code 404, message File not found
::1 - - [23/Nov/2025 18:05:14] "GET /unpkg.com HTTP/1.1" 404 -
::1 - - [23/Nov/2025 18:05:14] code 404, message File not found
::1 - - [23/Nov/2025 18:05:14] "GET /unpkg.com HTTP/1.1" 404 -

Подробнее здесь: https://stackoverflow.com/questions/798 ... -hard-disk
Мобильная версия